@zeniai/web-app-ui 5.2.17-dev → 5.2.18-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-OroYq1dZ.js +1 -0
- package/dist/assets/AddressScreen-ApC_R0Wp.js +9 -0
- package/dist/assets/{AiCfoScreen-HMy5Y7Mq.js → AiCfoScreen-ceOXZKkH.js} +2 -2
- package/dist/assets/{BillPayApprovalRoutes-ClKax7IT.js → BillPayApprovalRoutes-DNBT8bBe.js} +1 -1
- package/dist/assets/{BillPayRoutes-BChpGQL2.js → BillPayRoutes-Ee1gMZDl.js} +18 -18
- package/dist/assets/{BusinessVerificationPageScreen-BwMN9nGs.js → BusinessVerificationPageScreen-BrCTRscW.js} +2 -2
- package/dist/assets/CardsAiCfoScreen-C_N9OShc.js +14 -0
- package/dist/assets/{ChargeCardRoutes-Dv5pDzqZ.js → ChargeCardRoutes-BnvieJVH.js} +1 -1
- package/dist/assets/CompanyPassportScreen-RJZfjyND.js +1 -0
- package/dist/assets/ConnectionAuthScreen-BeUh42uJ.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BxM3YPtm.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-D_6fNZiA.js → CustomerOnboardingRoutes-CHFrWBuQ.js} +3 -3
- package/dist/assets/{DashboardRoutes-Cp_J4k4_.js → DashboardRoutes-DzdPS_ou.js} +4 -4
- package/dist/assets/DefaultTenantHome-D1Wy6Wl5.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-BkAznvqR.js +18 -0
- package/dist/assets/{DrawerScreen-CTCbWuBb.js → DrawerScreen-DbGHqqp3.js} +1 -1
- package/dist/assets/EntityDetailRoutes-BZZT4beI.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-DRT8zgD0.js +25 -0
- package/dist/assets/FeaturePreviewScreen-BuOhC0VV.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-But5JTd3.js +1 -0
- package/dist/assets/MagicLinkRoutes-BXYryYOa.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-Djwwkjab.js +12 -0
- package/dist/assets/{MobileAppDrawer-C850zeFL.js → MobileAppDrawer-KiFiOGbB.js} +1 -1
- package/dist/assets/NotFoundScreen-CdBZ6E4V.js +1 -0
- package/dist/assets/NotificationRoutes-BuE5Ia0t.js +1 -0
- package/dist/assets/OAuthConsentScreen-BHoiJyyq.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-CYJYOUC0.js +1 -0
- package/dist/assets/PeopleRoutes-DQ4ywy5y.js +22 -0
- package/dist/assets/PerformanceRoutes-DlI-5IYy.js +1 -0
- package/dist/assets/{Preview-BD6Y1F_q.js → Preview-C3t9OASa.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BlMcHgbG.js → QBOConnectionScreen-BcAa0XdH.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-nJxxaKUX.js → ReimbursementApprovalRoutes-vvvoQ_Sf.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DXovejDg.js → ReimbursementApprovalRuleDetailScreen-DOYdcnj3.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-41mQ1voL.js → ReimbursementRoutes-CVrOZVi7.js} +8 -8
- package/dist/assets/{ReportsRoutes-CPxhUqlo.js → ReportsRoutes-BSaDsWab.js} +1 -1
- package/dist/assets/RewardsRoutes-DsYtBmZx.js +1 -0
- package/dist/assets/{ScreenRoutes-DBgtMxcS.js → ScreenRoutes-_KkX47BV.js} +2 -2
- package/dist/assets/{SettingsRoutes-C3VXjgEl.js → SettingsRoutes-DqjN1ABZ.js} +7 -7
- package/dist/assets/{SetupPagesScreen-BX3zI3tV.js → SetupPagesScreen-usZWca-_.js} +5 -5
- package/dist/assets/SignInScreen-BDE1HpBU.js +1 -0
- package/dist/assets/SignOutScreen-xueiP_tN.js +9 -0
- package/dist/assets/{TaskListScreen-DbBL-EqC.js → TaskListScreen-DduFWf5s.js} +2 -2
- package/dist/assets/TaskRoutes-C6C-H9ff.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-8oHAjr2u.js → TransactionDetailRoutes-BiA_QHF1.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Bfy3N_JT.js → TransactionDetailScreen-D0qCr6b1.js} +2 -2
- package/dist/assets/{TransactionListRoutes-C46bH8Mo.js → TransactionListRoutes-DIJytNYy.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CzmHsChK.js → TreasuryRoutes-BxXAoPv6.js} +6 -6
- package/dist/assets/{VendorsRoutes-CUyxWOUM.js → VendorsRoutes-C0IKd0L4.js} +16 -16
- package/dist/assets/WiseConfirmationScreen-BSv238Gl.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-8seJMANR.js → ZeniAccountRoutes-DyxLcHZW.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-Dyx3X86U.js +9 -0
- package/dist/assets/{accountMappingHelper-Cg1rcuy8.js → accountMappingHelper-B-kf-Qnc.js} +1 -1
- package/dist/assets/{analytics-CP-wGaZJ.js → analytics-DtYJ-EGT.js} +1 -1
- package/dist/assets/{analyticsHelper-BZTNTJma.js → analyticsHelper-CTlcOyiL.js} +1 -1
- package/dist/assets/{core-4nWRIid2.js → core-DnZcjy6X.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-B-9vw5Be.js → decodeURIComponentSafe-CjxujRw-.js} +1 -1
- package/dist/assets/{dnd-DPx0nGIt.js → dnd-eoV-_JYH.js} +1 -1
- package/dist/assets/{empty-dwCpPdyI.js → empty-DkIaLxCd.js} +1 -1
- package/dist/assets/{empty-BWSUSl2t.js → empty-Dq2hLrCm.js} +1 -1
- package/dist/assets/{emptyVideoElement-Cgz9sC1U.js → emptyVideoElement-BFB9pddL.js} +1 -1
- package/dist/assets/{epic-BIxKmwU7.js → epic-Blr6eiMV.js} +1 -1
- package/dist/assets/getLocaleForTenant-CtnTFS0P.js +1 -0
- package/dist/assets/{index-C53rjstg.js → index-C8_nlYo6.js} +2 -2
- package/dist/assets/{index-D7c6Pfp9.js → index-CiCTnO2S.js} +1 -1
- package/dist/assets/{index-ot86Rern.js → index-DUKU6sVX.js} +1 -1
- package/dist/assets/{index-P8XH9v_Z.js → index-D_CZgugN.js} +1 -1
- package/dist/assets/{index-DmHtkhiK.js → index-Dmm4l94W.js} +1 -1
- package/dist/assets/{index-BEdY_Av6.js → index-Wtyhkk6J.js} +1 -1
- package/dist/assets/{index-CbGX11uA.js → index-nBWRmUT4.js} +13388 -13344
- package/dist/assets/{index-B89XzExo.js → index-nn6YvIGD.js} +1 -1
- package/dist/assets/{lexical-Dce73siJ.js → lexical-CSqytB8g.js} +1 -1
- package/dist/assets/{liveblocks-BqtYq8PY.js → liveblocks-DKL6viSK.js} +1 -1
- package/dist/assets/{lottie-C6mBeCcV.js → lottie-Dz5luYQG.js} +1 -1
- package/dist/assets/{mui-ChRNPf14.js → mui-sr6zger7.js} +1 -1
- package/dist/assets/{pathToGoBack-DjzKcd4A.js → pathToGoBack-DpO-gBzq.js} +1 -1
- package/dist/assets/{pdf-CHegScPw.js → pdf-BNSeVvBm.js} +4 -4
- package/dist/assets/{pdf-lib-xuF5byC3.js → pdf-lib-DwpnbCVp.js} +1 -1
- package/dist/assets/{plaid-j-SLH4pe.js → plaid-QvRDxgoN.js} +1 -1
- package/dist/assets/{pusher-BK7gFb-W.js → pusher-senIjtt-.js} +1 -1
- package/dist/assets/{react-YqzjdluA.js → react-BGDkRw8Y.js} +1 -1
- package/dist/assets/{react-CWkBMv_4.js → react-CBRcLxW-.js} +1 -1
- package/dist/assets/{react-Dy3J-4XE.js → react-CiyNePZ5.js} +1 -1
- package/dist/assets/{react-D_MXXpOM.js → react-ClmbMdlp.js} +1 -1
- package/dist/assets/{react-Bo9yX59J.js → react-CuKQRzYG.js} +1 -1
- package/dist/assets/{react-wzy7xDal.js → react-OAPKV4uC.js} +1 -1
- package/dist/assets/{recharts-UIIeT-6j.js → recharts-Bim6mdwu.js} +1 -1
- package/dist/assets/{routePaths-BYuMJjxP.js → routePaths-D0N7YUlE.js} +1 -1
- package/dist/assets/{sentry-BtWdTNDK.js → sentry-DFI2OQU2.js} +1 -1
- package/dist/assets/{url-CkFCyaeM.js → url-4e0ZWhZq.js} +1 -1
- package/dist/assets/{url-CUWwwyN4.js → url-p6YiHaLn.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-7YoEarS7.js → useAiCfoDashboardSuggestedQuestionsChips-Bcrl6X1X.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BqNcSAwL.js +1 -0
- package/dist/assets/useCashManagementBanner-rPbgM7YP.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-DCjAMeeL.js → useChargeCardPusherEvents-uhG5ouo_.js} +1 -1
- package/dist/assets/{useDeviceId-BVGc_c85.js → useDeviceId-DasP_-mC.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-DZSBVmEz.js +1 -0
- package/dist/assets/{useInitialThreadRequest-BMuxer3t.js → useInitialThreadRequest-Ch4ouOBD.js} +1 -1
- package/dist/assets/{utils-BGj88Dzy.js → utils-cHxIh7E8.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-MO-qZsKE.js → withTransactionSidePanel-CWy10IlG.js} +2 -2
- package/dist/assets/{zeni-epic-state-Brhydpej.js → zeni-epic-state-m4zoW3ek.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-B2KIG7En.js +0 -1
- package/dist/assets/AddressScreen-BRHUGjlq.js +0 -9
- package/dist/assets/CardsAiCfoScreen-DO_y52lp.js +0 -14
- package/dist/assets/CompanyPassportScreen-DpirfeBa.js +0 -1
- package/dist/assets/ConnectionAuthScreen-rOB6ynUK.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-C98l4ZVS.js +0 -1
- package/dist/assets/DefaultTenantHome-D0bfOiik.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-CEzBRH9X.js +0 -18
- package/dist/assets/EntityDetailRoutes-8jxY5Riu.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-BLGJhe2d.js +0 -25
- package/dist/assets/FeaturePreviewScreen-BYw0siNX.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-D5JpfjXx.js +0 -1
- package/dist/assets/MagicLinkRoutes-DJ8XQppN.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-Pc9aSzuu.js +0 -12
- package/dist/assets/NotFoundScreen-D8y3QSjF.js +0 -1
- package/dist/assets/NotificationRoutes-CgDlCmJS.js +0 -1
- package/dist/assets/OAuthConsentScreen-BHm1bSWe.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CxkAljmn.js +0 -1
- package/dist/assets/PeopleRoutes-Cwuko2wK.js +0 -22
- package/dist/assets/PerformanceRoutes-Cpl-d1r4.js +0 -1
- package/dist/assets/RewardsRoutes-BXExREiG.js +0 -1
- package/dist/assets/SignInScreen-DYVSrH1Q.js +0 -1
- package/dist/assets/SignOutScreen-D8IS2BPQ.js +0 -9
- package/dist/assets/TaskRoutes-CP206xuh.js +0 -9
- package/dist/assets/WiseConfirmationScreen-lyjRGpZ9.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-D_5y24R6.js +0 -9
- package/dist/assets/getLocaleForTenant-Bpp7IHaZ.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DuEP5Klm.js +0 -1
- package/dist/assets/useCashManagementBanner-_9igQwqA.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-BTnBt-Sy.js +0 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-DKL6viSK.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as N,N as ae,o as ne,p}from"./core-DnZcjy6X.js";import{MH as k,MI as v,MJ as F,BD as B,Bp as T,MK as D,ML as oe,MM as ie,Bt as se,fE as $,BA as le,Bx as re}from"./zeni-epic-state-m4zoW3ek.js";import{J as g,o as r,n as de,e as j,k as G,p as ce,q as me,V as pe,r as V,w as ue,i as he,s as xe,x as ge,E as fe,y as we,B as be,F as Se,Q as ye,S as ke,M as ve,G as je,U as $e}from"./index-nBWRmUT4.js";import{n as m}from"./mui-sr6zger7.js";import f from"./NotFoundScreen-CdBZ6E4V.js";import{a as I}from"./sentry-DFI2OQU2.js";import"./recharts-Bim6mdwu.js";import"./analytics-DtYJ-EGT.js";import"./plaid-QvRDxgoN.js";import"./dnd-eoV-_JYH.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz5luYQG.js";import"./lexical-CSqytB8g.js";import"./pdf-BNSeVvBm.js";import"./utils-cHxIh7E8.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="19a9333d-8856-4881-86e4-63a27d80de48",e._sentryDebugIdIdentifier="sentry-dbid-19a9333d-8856-4881-86e4-63a27d80de48")}catch{}})();const Ie=m.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
+
`,Ce=x((function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}}),(function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(F({data:l}))}}}))(de);function M(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Be=m.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
height: 100vh;
|
|
13
|
+
width: 100%;
|
|
14
|
+
flex: 1 1 auto;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
+
`,De=x((function(e,a){const{isSubPage:n}=a;return{addressToEdit:D(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}}),(function(e,a){const{navigate:n,location:o}=a,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 Ae({isSubPage:e}){const a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(Be,{windowSize:o,children:t.jsx(De,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},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}),Le=m.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
+
`,Ee=x((function(e){const a=k(e),n=v(e),o=D(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}}),(function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(F({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=V(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(pe);function Ne(){const e=C(),a=y(),n=g(),{vendorId:o,billId:i}=S();return o==null||i==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ee,{location:a,navigate:e,vendorId:o,billId:i})})})}const Me=m.div`
|
|
29
|
+
display: flex;
|
|
30
|
+
height: 100%;
|
|
31
|
+
width: 100%;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
align-items: center;
|
|
35
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
+
`,Fe=x((function(e){const a=k(e),n=v(e),o=D(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}}),(function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"international",i,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=V(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(xe);function Te(){const e=C(),a=y(),n=g(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?t.jsx(f,{}):t.jsx(Me,{windowSize:n,children:t.jsx(Fe,{location:a,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Ge={containerWidth:new je(100,58)},Ve=m(ke)`
|
|
38
|
+
width: ${r.sp4};
|
|
39
|
+
height: ${r.sp4};
|
|
40
|
+
margin-bottom: ${r.sp3};
|
|
41
|
+
margin-top: ${r.sp3};
|
|
42
|
+
margin-left: ${r.sp8};
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
position: absolute;
|
|
45
|
+
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
+
`,He=m.div`
|
|
47
|
+
display: flex;
|
|
48
|
+
height: 100vh;
|
|
49
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
+
width: 100vw;
|
|
51
|
+
overflow-y: scroll;
|
|
52
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
+
`,Ke=m.div`
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
|
|
58
|
+
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
+
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
+
`,_e=m.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
|
|
67
|
+
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
+
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
+
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
+
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
+
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
+
`,Ue=x((function(e,a){return{file:a.file,type:a.type}}))(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=te(),d=s.get("token"),H=n.pathname.includes("address"),w=g(),K=ge(),A=fe(),b=we(),_=()=>{K.toggle()},U=N((u=>k(u))),W=N((u=>v(u))),{authParams:J,fetchState:c,billAttachment:Q,billFetchState:P,companyName:q,currencySymbol:O,amount:R}=U,{tenantId:z,userId:L,sessionId:E}=J,{fetchState:X,internationalBankAccountCreateStatus:Y}=W;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{b&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&a(le(i,o,d))}),[b,c,i,o,d,a]),I.useEffect((()=>{b&&c==="Completed"&&($(L,E,z),l!=null&&a(re(l)))}),[c,b,L,E,z,l,a]),c==="Error"?t.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&P==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",q,l??"",We(n.pathname),O,R))(u)}),t.jsxs(He,{windowSize:w,children:[w!=="small"?t.jsx(Ve,{onClick:_}):null,t.jsx(_e,{windowSize:w,isAddressPage:H,children:P==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(Ue,{file:Q,type:"bill"})}),t.jsx(Ke,{windowSize:w,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Je(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Je,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(M,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(M,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(Ae,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ne,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Te,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-DKL6viSK.js";import{a as g}from"./sentry-DFI2OQU2.js";import{u as F,g as _,h as O,t as w,j as l,N as E}from"./core-DnZcjy6X.js";import{z as r,E as P,a as V,f as A,e as N,g as $,v as Q,Q as R,h as W}from"./index-nBWRmUT4.js";import{e$ as q,Ms as B,MC as G,Mt as H,fE as J,g4 as K,My as X,gx as Y,c_ as Z,MD as ee,ME as te}from"./zeni-epic-state-m4zoW3ek.js";import{n as ne}from"./mui-sr6zger7.js";import{u as se}from"./useDeviceId-DasP_-mC.js";import{f as ae}from"./analyticsHelper-CTlcOyiL.js";import{t as ie}from"./getLocaleForTenant-CtnTFS0P.js";import"./recharts-Bim6mdwu.js";import"./analytics-DtYJ-EGT.js";import"./plaid-QvRDxgoN.js";import"./dnd-eoV-_JYH.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz5luYQG.js";import"./lexical-CSqytB8g.js";import"./pdf-BNSeVvBm.js";import"./utils-cHxIh7E8.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]="c104e359-4351-42e7-8d1c-dd017a5eda4a",t._sentryDebugIdIdentifier="sentry-dbid-c104e359-4351-42e7-8d1c-dd017a5eda4a")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=F(),a=_(),f=O(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:C,magicLinkEmail:c,verifyDeviceFetchState:D,resendVerifyDeviceOTPFetchState:M}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),v=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>q(e))),y=l((e=>B(e))),T=r.getSignedInUser(),b=P().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,m)))}),[n,p,t,i,m,s?.zeniSessionId]),g.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&v!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(y.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,b,void 0,y.tenantsInOrder),Y().then((()=>{const e=W();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin($.Event.loginSuccess,"email",Z(o.productSettings))}),2e3))}),[h,S,v,s,o,y,b,a.state,t]);const z=g.useCallback((()=>{f("/signin/auth")}),[f]),U=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),j=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))}),[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(Q,{phoneNumber:C,verifyOtpFetchState:D.fetchState,resendVerifyDeviceOTPFetchState:M,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:z});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||T!=null){const e=a.state?.origin??"/";return u.jsx(E,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||m==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(E,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{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{xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as V}from"./liveblocks-DKL6viSK.js";import{a as c}from"./sentry-DFI2OQU2.js";import{u as fe,j as n,i as We,g as He,h as Je,l as G}from"./core-DnZcjy6X.js";import{e$ as me,fJ as Ke,fK as pe,fv as Qe,bn as Xe,e_ as qe,fL as ea,fM as aa,fO as ta,fR as na,fS as g,fU as sa,fV as de,fY as oa,fW as ia,fX as ra,fZ as da,cQ as la,f$ as ca,cW as ua,fu as fa,g4 as ma,g5 as pa,g3 as ba}from"./zeni-epic-state-m4zoW3ek.js";import{a9 as ha,aa as Sa,x as ga,w as Ea,z as k,y as ka,u as Ca,i as r,d as ya,_ as Ia,ab as Ta,D as _a,c as wa,ac as Aa,a5 as Da,ad as Fa,ae as va,af as le,ag as ce,L as $a,ah as xa,ai as ue,e as P,a1 as Ma,r as _,aj as R,ak as Ga}from"./index-nBWRmUT4.js";import{D as Pa}from"./mui-sr6zger7.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="6a2246f1-88bc-4177-830e-85bf89ffa112",f._sentryDebugIdIdentifier="sentry-dbid-6a2246f1-88bc-4177-830e-85bf89ffa112")}catch{}})();const Ra=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=We(),a=He(),C=ga(),o=Je(),B=Qe(),m=fe(),{useFeatureGate:i}=Ea(),N=k.getSignedInUser(),U=Xe(N),s=n((e=>me(e))),be=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n((e=>qe(e))),L=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[w,j]=c.useState(void 0),A=G("/:tenantEmailDomain/dashboard")!==null,Z=G("/:tenantEmailDomain/reports")!==null,I=G("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),Y=n((e=>ea(e))),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n((e=>aa(e)));c.useEffect((()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(ta(!0))}),[y,T,D.fetchState,I]);const h=k.getSignedInUser(),F=n((e=>e.tenantState)),Ce=n((e=>F.fetchState==="Completed"?na(e):[])),E=n((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:_e}=i(r.isExpenseAutomationEnabledV2),W=Ia(),{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=U||!U&&ve,xe=n((e=>g(e).totalUnreadCount)),Me=n((e=>g(e).reducedFetchCountState)),H=n((e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount)),J=n((e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount)),Ge=n((e=>g(e).notificationDetailsByTab.tasks.fetchCountState)),$=n((e=>g(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:K,isLoading:Q,isFetchingMore:X,hasFetchedAll:q,fetchMore:Pe}=Ta();c.useEffect((()=>{const e=setTimeout((()=>Pe?.()),0);return()=>clearTimeout(e)})),c.useEffect((()=>{if(Q===!1&&X===!1&&q===!0)if(s?.companyId!=null&&K!=null){const e=`dashboard_${s.companyId}`;j(K.filter((u=>u.roomId===e&&u.readAt==null)).length)}else j(0)}),[Q,X,q]),c.useEffect((()=>{y&&!I&&Ge.fetchState==="Not-Started"&&B.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,B.tenantId]),c.useEffect((()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),c.useEffect((()=>{w!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:w},"comments")))}),[w,$.fetchState]);const Re={fetchStatus:Me,count:xe},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n((e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0)),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Ve=_a(),te=n((e=>ia(e,S,h,_e,Te).fetchState)),ne=n((e=>ra(e).fetchState)),Be=A&&(te==="Completed"||te==="Error")||Z&&(ne==="Completed"||ne==="Error")||!A&&!Z?void 0:"disabled",Ne=c.useMemo((()=>da(s.userRole)),[s.userRole]),Ue=la(Ne),Oe=s?.rewardsLastViewedTime==null,Le=h?.userEmail!=null&&Y.fetchState==="Completed"&&ca(Y.notificationSettings,h.userEmail,z,s),se=wa(),je=se&&Aa(a),oe=ua(Ve?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=c.useCallback((()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Da(a.pathname)!=="treasury"),[v,oe,ie,a.pathname,t]),[Ze,re]=c.useState(x);c.useEffect((()=>{re(x())}),[x]);const ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,Ye=Fa(ze);return V.jsx(Pa,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:V.jsx(va,{signedInUser:N,currentTenantId:F.currentTenantId??"",tenants:F.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Be,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:Ye,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:Le,notificationCountDetails:Re,isExpenseAutomationEnabledForUser:W,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=H===0&&J>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=H===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const u=_(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(P.trackAICFOChatScreenStateChanged("viewed","left_menu",L??null,null),!be)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=_(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=_(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&P.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Ga(e.type);ue(e.type)?(L!=null&&m(ba()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let p=`/${encodeURIComponent(u)}/`;const M=R(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":xa(l)?p+="settings/my_profile":ue(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(pa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;P.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:je,aiCfoView:O,isOnDashboard:A,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:De,newYearAnimationEnabled:Fe})})})),ja=f=>{const d=fe(),t=n((C=>me(C))),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Ke(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ra,{...f,...a})};export{ja as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-DKL6viSK.js";import{h as n,n as e}from"./core-DnZcjy6X.js";import{R as i}from"./index-nBWRmUT4.js";import"./mui-sr6zger7.js";import"./sentry-DFI2OQU2.js";import"./zeni-epic-state-m4zoW3ek.js";import"./recharts-Bim6mdwu.js";import"./analytics-DtYJ-EGT.js";import"./plaid-QvRDxgoN.js";import"./dnd-eoV-_JYH.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz5luYQG.js";import"./lexical-CSqytB8g.js";import"./pdf-BNSeVvBm.js";import"./utils-cHxIh7E8.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]="9ceba748-25d5-4d32-9a3c-da4194015415",o._sentryDebugIdIdentifier="sentry-dbid-9ceba748-25d5-4d32-9a3c-da4194015415")}catch{}})();const a=e(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as ct,a as mt,n as dt,j as A}from"./liveblocks-DKL6viSK.js";import lt from"./NotFoundScreen-CdBZ6E4V.js";import{a as k}from"./sentry-DFI2OQU2.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as J}from"./core-DnZcjy6X.js";import{cx as St,fL as X,e$ as H,fZ as bt,fS as b,Tt as O,fV as d,fK as y,sN as M,yj as It,Tu as Tt,fJ as Ct,f$ as yt,sS as Et,Tv as $,bo as F,fD as B,sW as K,Tw as _t,cJ as At,cC as Nt}from"./zeni-epic-state-m4zoW3ek.js";import{Z as wt,z as xt,w as Bt,i as Dt,a0 as Rt,cW as vt,r as N,a9 as Pt,cX as Ut,aa as Gt,q as $t}from"./index-nBWRmUT4.js";import"./mui-sr6zger7.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-BqNcSAwL.js";import"./recharts-Bim6mdwu.js";import"./analytics-DtYJ-EGT.js";import"./plaid-QvRDxgoN.js";import"./dnd-eoV-_JYH.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz5luYQG.js";import"./lexical-CSqytB8g.js";import"./pdf-BNSeVvBm.js";import"./utils-cHxIh7E8.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]="0801778d-7b19-40ba-91d7-12b7459cae5b",t._sentryDebugIdIdentifier="sentry-dbid-0801778d-7b19-40ba-91d7-12b7459cae5b")}catch{}})();const Mt=(t,l)=>new Promise(((n,u)=>{const g=t.map((i=>new Promise((s=>{l(i),s()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((i=>{u(i)}))})),jt=kt((function(t,l){const n=X(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:w,fetchMoreCommentsNotifications:D}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(K("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(w(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(O(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(_t(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else D?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(K("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{m==="read"&&(w(r),t($([r],F())))}))).then((()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(Et("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,w).then((()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Pt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=wt(),i=St(u??""),s=pt(),h=xt.getSignedInUser(),[w,D]=k.useState(!1),a=S((e=>X(e))),o=S((e=>H(e))),{useFeatureGate:m}=Bt(),{isFeatureEnabled:c}=m(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Q=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),V=S((e=>b(e).currentTab)),R=S((e=>b(e).currentSubTab)),Y=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),v=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),tt=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),et=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),at=vt().allUsers,{inboxNotifications:x,isLoading:E,hasFetchedAll:T,isFetchingMore:P,fetchMore:ot}=ct(),{threads:W,isLoading:L,fetchMore:Z,isFetchingMore:q,hasFetchedAll:z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect((()=>{if(V!==i&&i!=null&&s(O(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[i]),k.useEffect((()=>{Y.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&T===!0&&o?.companyId!=null&&x!=null){const e=`dashboard_${o.companyId}`,p=x.filter((C=>C.roomId===e&&C.readAt==null)).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}}),[E,T]),k.useEffect((()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=E||P===!0||T!==!0||E||P===!0||T!==!0;k.useEffect((()=>{U&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))}),[U,v]),k.useEffect((()=>{s(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&w===!1&&(D(!0),s(It()))}),[a.fetchState]),k.useEffect((()=>{if(E===!1&&L===!1&&x!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=x.filter((f=>f.roomId===e)).filter((f=>f.kind==="thread")),C=p.filter((f=>f.readAt==null)),_=p.map((f=>f.id)),it=p.map((f=>{const G=W.find((rt=>rt.id===f.threadId));return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(q||z===!0||Z==null||Z(),null)})).filter((f=>f!=null));s(d({allNotificationsIds:_},"comments")),s(y({totalCount:_.length,unreadCount:C.length},"comments")),s(Tt(it))}}),[E,P,q,T,z,L,x?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const C=Ct(p.mode);if(C==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const _=[];R==="all"?_.push("read","unread"):R!=="mentions"&&_.push(R),s(M("task_manager",C,_,!0))}}}},nt=dt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Q,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return A.jsxs(gt,{children:[A.jsx(J,{path:"/:selectedTab",element:A.jsx(Vt,{})}),A.jsx(J,{path:"*",element:A.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as m}from"./liveblocks-DKL6viSK.js";import{a as r}from"./sentry-DFI2OQU2.js";import{u as T,g as A,j as o,N as R}from"./core-DnZcjy6X.js";import{MR as j,e$ as C,fR as P,MS as x,MT as z,MU as D,MV as L,on as k,LO as N}from"./zeni-epic-state-m4zoW3ek.js";import{z as h,K as I}from"./index-nBWRmUT4.js";import"./mui-sr6zger7.js";import"./recharts-Bim6mdwu.js";import"./analytics-DtYJ-EGT.js";import"./plaid-QvRDxgoN.js";import"./dnd-eoV-_JYH.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz5luYQG.js";import"./lexical-CSqytB8g.js";import"./pdf-BNSeVvBm.js";import"./utils-cHxIh7E8.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]="a94609d2-84aa-4c69-9596-29f7f63cd1af",n._sentryDebugIdIdentifier="sentry-dbid-a94609d2-84aa-4c69-9596-29f7f63cd1af")}catch{}})();function ee(){const n=T(),a=A(),{params:t,error:i}=r.useMemo((()=>j(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=>C(e))),l=o((e=>P(e))),d=o((e=>e.tenantState.fetchState)),y=o(x),S=o(z),c=o(D),[v,E]=r.useState(null),[b,U]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[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((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const _=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((M=>M.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),u=v??_;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:u,onSelectTenant:E,approveError:b??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(N(s.userId,s.zeniSessionId??void 0,u,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{U("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(R,{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-DKL6viSK.js";import{h as V,u as z,g as H,i as J,j as d,n as K,o as Q,p as b}from"./core-DnZcjy6X.js";import{e$ as U,sB as R,s9 as X,Nm as v,s4 as S,bs as ee,bn as ae,bZ as te,s5 as se,Nn as oe,N9 as C,dL as re,wg as ne,No as ce,wD as ie,fI as le,fG as de}from"./zeni-epic-state-m4zoW3ek.js";import{z as fe,Z as me,a0 as pe,D as ue,w,i as N,F as he,e as M,ap as ge,r as Fe}from"./index-nBWRmUT4.js";import"./mui-sr6zger7.js";import Ie from"./NotFoundScreen-CdBZ6E4V.js";import{F as be}from"./FeaturePreviewScreen-BuOhC0VV.js";import{a as g}from"./sentry-DFI2OQU2.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-BqNcSAwL.js";import{u as Se}from"./useInitialThreadRequest-Ch4ouOBD.js";import{t as Te}from"./routePaths-D0N7YUlE.js";import{M as ye}from"./MobileAppDrawer-KiFiOGbB.js";import"./recharts-Bim6mdwu.js";import"./analytics-DtYJ-EGT.js";import"./plaid-QvRDxgoN.js";import"./dnd-eoV-_JYH.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz5luYQG.js";import"./lexical-CSqytB8g.js";import"./pdf-BNSeVvBm.js";import"./utils-cHxIh7E8.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]="2461c57a-af4e-4f8c-a71f-3553cf1e0229",s._sentryDebugIdIdentifier="sentry-dbid-2461c57a-af4e-4f8c-a71f-3553cf1e0229")}catch{}})();const T=(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})}},De=K((function(s){const e=oe(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(v(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(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=re(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 f=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(f,{state:{pathnameStackToGoBack:u,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("../../")}}}))(ge);function O(){const s=V(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[c,p]=g.useState(!1),[f,u]=g.useState(!1),h=fe.getSignedInUser(),y=d((t=>U(t))),$=y.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),D=d((t=>t.profitAndLossState)),k=d((t=>t.reportUIOptionsState.selectedForecast)),A=t=>D.pandLByForecastID[t]!=null&&se(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=me();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:q}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!f){u(!0);const t=((m,E,P)=>E!=null?m.forecasts.findIndex((I=>I.id===E)):P!=null?m.forecasts.findIndex((I=>I.id===P)):m.forecasts.length>0?0:-1)(i,o,k?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(e(v(i.forecasts[t].id,t)),T(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!A(i.forecasts[t].id)&&F&&e(S(i.forecasts[t].id))}}),[c,p,e,l,i,f,u,R,S,F]);const x=ue(),G=x?.loggedInUserRole!=null&&ee(x.loggedInUserRole),{useFeatureGate:_}=w(),{isFeatureEnabled:L}=_(N.isReportsCommentingEnabled),W=Se(L?y?.companyId:void 0,{clearParams:l&&f}),[Y,Z]=g.useState(!1),j=t=>{Z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:M,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(De,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:A,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:G,isAiCfoAccessEnabled:B,onAskAiCfoClick:q,isReportsCommentingEnabled:L,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ze(){const s=d((c=>U(c))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(N.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(Q,{children:[n.jsx(b,{path:"/",element:n.jsx(O,{})}),n.jsx(b,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(b,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-DKL6viSK.js";import{Ni as oe,e$ as J,kL as _,fI as Q,fG as ie,KM as ee,MY as re,vd as ke,Nj as X,v2 as ve,vn as Ee,vh as le,v6 as de,vl as Pe,vi as je,Nk as ce,x2 as Le,fs as Te,gk as Ae,Nl as H,va as pe,v9 as ue,vq as Fe,c7 as Re}from"./zeni-epic-state-m4zoW3ek.js";import{J as me,w as ae,i as G,z as K,d as ge,C as fe,H as he,al as Ce,am as Oe,G as ye,o as O,I as be,a as M,an as Ve,Z as Ze,a0 as Be,F as Ue,e as Se,g as $e,r as ze,ao as He,D as Ge}from"./index-nBWRmUT4.js";import{D as we,n as N,S as xe}from"./mui-sr6zger7.js";import te from"./NotFoundScreen-CdBZ6E4V.js";import{a as d}from"./sentry-DFI2OQU2.js";import{u as se,i as _e,j as g,h as Ke,g as Me,n as Ne,o as ne,p as z}from"./core-DnZcjy6X.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-BqNcSAwL.js";import{M as qe}from"./MobileAppDrawer-KiFiOGbB.js";import"./recharts-Bim6mdwu.js";import"./analytics-DtYJ-EGT.js";import"./plaid-QvRDxgoN.js";import"./dnd-eoV-_JYH.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz5luYQG.js";import"./lexical-CSqytB8g.js";import"./pdf-BNSeVvBm.js";import"./utils-cHxIh7E8.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]="ca646813-af8d-46fa-9d5f-44e622c5d14e",e._sentryDebugIdIdentifier="sentry-dbid-ca646813-af8d-46fa-9d5f-44e622c5d14e")}catch{}})();const Ye={overlayWidth:new ye(100,100,48)},W=M.getLocalizedStrings().peoplePage.invitePage,Xe=M.getLocalizedStrings().common,Je=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=_e(),r=g((l=>oe(l))),p=g((l=>J(l))),v=g((l=>_(l))),{useFeatureGate:D}=ae(),{isFeatureEnabled:I}=D(G.isDebitCardFeatureEnabled),E=Q(I,p),L=ie(p),T=ee(p),B=re(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!E&&v&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(X()),b()},A=()=>{V===!0?S(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(G.isChargeCardFeatureEnabled),j=ge(p,P,I),{isCardsHidden:F}=fe(p?.tenantId),y=!j||F,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:v,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(de(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(le({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?ve(e):Ee(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{x===!1&&w!=null&&m(ke(w))}),[x,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Ye.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Qe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:W.discardTitle}),descriptionComponent:a.jsx(Ie,{children:W.discardDescription}),primaryButtonText:W.discard,secondaryButtonText:Xe.no,action:o,isEditPopup:!0}):null,a.jsx(Oe,{...s})]})})},Qe=N(xe)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,De=N(be.H6Regular)`
|
|
6
|
+
margin-top: ${O.sp7};
|
|
7
|
+
padding-left: ${O.sp8};
|
|
8
|
+
padding-right: ${O.sp8};
|
|
9
|
+
color: ${e=>e.theme.colors.primary};
|
|
10
|
+
word-break: break-word;
|
|
11
|
+
`,Ie=N(be.LargeRegularSp)`
|
|
12
|
+
color: ${e=>e.theme.colors.hero};
|
|
13
|
+
padding-left: ${O.sp8};
|
|
14
|
+
padding-right: ${O.sp8};
|
|
15
|
+
margin-bottom: 30px;
|
|
16
|
+
margin-top: ${O.sp4};
|
|
17
|
+
white-space: pre-line;
|
|
18
|
+
`,ea={overlayWidth:new ye(100,100,48)},q=M.getLocalizedStrings().peoplePage.invitePage,aa=M.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=d.useState(!1),[k,S]=d.useState(!1),w=g((o=>oe(o))),r=g((o=>J(o))),p=g((o=>_(o))),{useFeatureGate:v}=ae(),{isFeatureEnabled:D}=v(G.isDebitCardFeatureEnabled),I=Q(D,r),E=ie(r),L=ee(r),T=re(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(X())},C=()=>{V===!0?S(!0):x()},A={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=v(G.isChargeCardFeatureEnabled),j=ge(r,P,D),{isCardsHidden:F}=fe(r?.tenantId),y=!j||F,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:o=>{m(le({peopleLocalData:o})),Z(!0)},onResetClick:x,onSaveClick:()=>{m(f==="zeni_only"?Pe(e):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:E,isLoading:U};return d.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(X()))}),[w.invitePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:q.discardTitle}),descriptionComponent:a.jsx(Ie,{children:q.discardDescription}),primaryButtonText:q.discard,secondaryButtonText:aa.no,action:A}):null,a.jsx(Ve,{...s})]})})},ta=N(xe)`
|
|
19
|
+
display: flex;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
`,na=Ne((function(e,t){const c=ce(e),n=K.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:_(e),analytics:Se}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(de(i,b))},onResendInvite:i=>{e(Fe(i))},onReloadPeople:()=>{e(pe()),e(ue(n,f))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(He);function Y({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=Ke(),n=se(),f=Me(),{areTenantIdsInSync:i}=Ze(),b=K.getSignedInUser(),h=g((s=>J(s))),{useFeatureGate:m}=ae(),{isFeatureEnabled:V}=m(G.isDebitCardFeatureEnabled),Z=g((s=>_(s))),k=!Q(V,h)&&Z,S=ee(h),w=h?.tenantId,{tenantEmailDomain:r}=h,[p,v]=d.useState(!1),[D,I]=d.useState(!1),[E,L]=d.useState(!1),[T,B]=d.useState("off"),[U,x]=d.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=We({mobileExploreReferrer:"People"}),u=g((s=>ce(s)));Be({isDataReady:u.fetchState==="Completed"});const P=g((s=>Le(s.classState,s.classListState))),j=g((s=>Te(s.userState,s.userRoleState,s.userListViewState,"manager"))),F=g((s=>Ae(s))),y=h?.companyId;d.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),v(!0),n(pe()))}),[p,b,w,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ue(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),L(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const R=()=>{I(!1),L(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(Ue,{analytics:Se,onLoad:s=>s.trackPageLoaded($e.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:D,managersListView:j,companyPassportView:F,classListView:P,companyId:y,mode:u.uiState.mode}):null,E===!0?a.jsx(Je,{closeDrawerHandler:R,isEditPeopleDrawerOpen:E,managersListView:j,companyPassportView:F,classListView:P,companyId:y,mode:u.uiState.mode}):null,a.jsx(qe,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:P,managersView:j,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=ze(f.state?.pathnameStackToGoBack,f.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function Da(){const e=Ge();return Re(e?.loggedInUserRole??[])?a.jsxs(ne,{children:[a.jsx(z,{path:"/",element:a.jsx(Y,{})}),a.jsx(z,{path:"new",element:a.jsx(Y,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(Y,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(te,{})})]}):a.jsx(ne,{children:a.jsx(z,{path:"*",element:a.jsx(te,{})})})}export{Da as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-DKL6viSK.js";import E from"./NotFoundScreen-CdBZ6E4V.js";import{a as r}from"./sentry-DFI2OQU2.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as O,p as h}from"./core-DnZcjy6X.js";import{e$ as B,Tx as b,bq as F,bn as N,ip as V,fD as $}from"./zeni-epic-state-m4zoW3ek.js";import{x as q,z as I,a0 as Y,cY as G}from"./index-nBWRmUT4.js";import"./mui-sr6zger7.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-BqNcSAwL.js";import{M as J}from"./MobileAppDrawer-KiFiOGbB.js";import"./recharts-Bim6mdwu.js";import"./analytics-DtYJ-EGT.js";import"./plaid-QvRDxgoN.js";import"./dnd-eoV-_JYH.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz5luYQG.js";import"./lexical-CSqytB8g.js";import"./pdf-BNSeVvBm.js";import"./utils-cHxIh7E8.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]="edeb52c7-cc81-4a77-9823-ccd3f9e9600e",e._sentryDebugIdIdentifier="sentry-dbid-edeb52c7-cc81-4a77-9823-ccd3f9e9600e")}catch{}})();const K=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)}}}))(G),L=()=>{const e=_(),t=v(),c=q(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),u=U(),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),D=C||k||x,d=r.useCallback(((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const y=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:T}=H({mobileExploreReferrer:"Performance"});return Y({isDataReady:n?.fetchState==="Completed"}),D?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-DFI2OQU2.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})}),[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`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:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-DKL6viSK.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DFI2OQU2.js";import{L as dt,bZ as Tc,e$ as Ac,Ms as Rc,MW as kl,c7 as Tl,g4 as Al,g5 as Rl}from"./zeni-epic-state-m4zoW3ek.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-cHxIh7E8.js";import{r as un}from"./empty-DkIaLxCd.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DwpnbCVp.js";import{r as Gl}from"./index-Dmm4l94W.js";import{r as zl}from"./index-DUKU6sVX.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-DnZcjy6X.js";import{u as Kl,z as Pc,L as Wl,N as Jl,O as Xl,k as Ql,e as tf}from"./index-nBWRmUT4.js";import"./mui-sr6zger7.js";import{d as Pe}from"./decodeURIComponentSafe-CjxujRw-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="12339125-5d04-445c-9ea4-280d4a950947",t._sentryDebugIdIdentifier="sentry-dbid-12339125-5d04-445c-9ea4-280d4a950947")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=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},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=(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 a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g})(d)})(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=(function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return(function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")})(this,g),S=b.call(this,(function(w,_,M){return typeof e=="string"?e:e(w,_,M)})(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d})(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map((function(p){return String(p)})),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",(function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c})(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=(function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1})(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))}),TypeError),i("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),i("ERR_INVALID_RETURN_VALUE",(function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")}),TypeError),i("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(d){return'"'.concat(d,'"')})),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")}),TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter((function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable}))),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach((function(x){m(k,x,j[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach((function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))}))}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&(function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=(function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)})(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.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 e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=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},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={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(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach((function(x){j[x]=k[x]})),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-DKL6viSK.js";import O from"./NotFoundScreen-CdBZ6E4V.js";import{a as p}from"./sentry-DFI2OQU2.js";import{h as x,g as C,u as E,j as u,N as D,n as k,o as W,p as b}from"./core-DnZcjy6X.js";import{e$ as I,QP as g,R3 as S,G1 as V,Fa as U,G0 as d,FT as $,Rg as B,G3 as G}from"./zeni-epic-state-m4zoW3ek.js";import{z as N,a9 as T,bZ as F,ag as L,bC as z,b_ as K}from"./index-nBWRmUT4.js";import"./mui-sr6zger7.js";import{u as P,R as A}from"./ReimbursementApprovalRuleDetailScreen-DOYdcnj3.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]="601edc68-8abf-4e3b-b94e-c3885e72f348",e._sentryDebugIdIdentifier="sentry-dbid-601edc68-8abf-4e3b-b94e-c3885e72f348")}catch{}})();const y="reimbursement-approval-rule-update",Q=k((function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{L(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}}))(T(F)),Z=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),c=u((a=>g(a))),v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,_,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(Q,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",q=k((function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{L(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(G(t,!0))}}}))(T(K)),H=()=>{const e=u((n=>I(n))),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(Z,{isLoading:s})},J=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),c=u((a=>g(a)));P();const v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,_,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(W,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(O,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as b}from"./liveblocks-
|
|
1
|
+
import{j as b}from"./liveblocks-DKL6viSK.js";import{a as f}from"./sentry-DFI2OQU2.js";import{u as T,j as y,h as _,g as O,i as k,n as V}from"./core-DnZcjy6X.js";import{lb as L,R3 as w,QP as C,FW as F,G6 as B,G1 as A,G2 as E,R4 as j,e$ as Q,G0 as W}from"./zeni-epic-state-m4zoW3ek.js";import{z as P,E as N,B as $,bP as z,ag as G,bC as K,bQ as H}from"./index-nBWRmUT4.js";import"./mui-sr6zger7.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]="2d89a4f2-a62f-4bfb-90bb-30844fbe56fc",e._sentryDebugIdIdentifier="sentry-dbid-2d89a4f2-a62f-4bfb-90bb-30844fbe56fc")}catch{}})();function J(){const e=T(),s=f.useRef(!1),t=y((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=y((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=V((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=G(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const R=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const g=(S=m.value,j(S)==null);var S;return{type:g?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!g}})),c=R.concat(I);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},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:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(z);function X(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=y((n=>w(n))),i=y((n=>C(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(F(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=V((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:C(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=G(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((g=>{const S=g.actorKind?.selectedOption,U=g.selectedRole?.selectedOption;let D=[];S==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(g.persons?.selectedUsers??[]).map((q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1}))));const x=g.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,h=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 R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const I=h?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:I}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(W(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=y((t=>Q(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?b.jsx(Z,{}):b.jsx(X,{})}function Z(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=y((n=>w(n))),i=y((n=>C(n))),[a,d]=f.useState(!1);if(J(),f.useEffect((()=>{a||(d(!0),s(F(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,J as u};
|