@zeniai/web-app-ui 5.1.51-qa → 5.1.52-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-Cg2gXbOf.js +1 -0
- package/dist/assets/{AddressScreen-DHENiPsE.js → AddressScreen-BBCv44qS.js} +2 -2
- package/dist/assets/{AiCfoScreen-BDeqJ8PX.js → AiCfoScreen-Da9zCyWe.js} +5 -5
- package/dist/assets/{BillPayApprovalRoutes-re8xxMBE.js → BillPayApprovalRoutes-TnPLWObs.js} +1 -1
- package/dist/assets/{BillPayRoutes-BKu8tYXF.js → BillPayRoutes-gRXPgRX3.js} +8 -8
- package/dist/assets/{BusinessVerificationPageScreen-7ydI8UR9.js → BusinessVerificationPageScreen-DWx2BUK6.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-QyowC-mN.js → CardsAiCfoScreen-BCU45aIH.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BbZEL-b5.js → ChargeCardRoutes-SrcIcjEg.js} +10 -10
- package/dist/assets/{CompanyPassportScreen-AZhDXSZE.js → CompanyPassportScreen-C2ZjBTtu.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DDij7-L5.js → ConnectionAuthScreen-DQGgk8VQ.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DndbS7zx.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-COHKYeEq.js → CustomerOnboardingRoutes-BiJk8RGO.js} +4 -4
- package/dist/assets/{DashboardRoutes-B1cE2wJc.js → DashboardRoutes-C2R9sFOt.js} +1 -1
- package/dist/assets/{DefaultTenantHome-DivCz85L.js → DefaultTenantHome-Cs1fEcl7.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-D2sqfin3.js +18 -0
- package/dist/assets/DrawerScreen-BXWf7y4o.js +1 -0
- package/dist/assets/EntityDetailRoutes--LkTS4Lg.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-pmgLYKV-.js → ExpenseAutomationRoutes-DN1VLKxs.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-C_7xKfC9.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-BrjX8V0E.js → HubSpotOAuthCallbackScreen-BtgwDGFv.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-Dn4g326h.js → MagicLinkRoutes-w9Xo_7JQ.js} +9 -9
- package/dist/assets/MagicLinkSignInScreen-_FORqdKk.js +12 -0
- package/dist/assets/{MobileAppDrawer-CjoW3Rax.js → MobileAppDrawer-B2Mj3GDG.js} +1 -1
- package/dist/assets/NotFoundScreen-DpHt-tQH.js +1 -0
- package/dist/assets/{NotificationRoutes-DE-Z8DSv.js → NotificationRoutes-Bd-2Em1h.js} +1 -1
- package/dist/assets/OAuthConsentScreen-DunOek_C.js +1 -0
- package/dist/assets/{PandLWithForecastRoutes-C3Yczwgv.js → PandLWithForecastRoutes-BnZrz52M.js} +1 -1
- package/dist/assets/{PeopleRoutes-ZidIbEdd.js → PeopleRoutes-tR11OG4C.js} +3 -3
- package/dist/assets/PerformanceRoutes-tqcqZlMe.js +1 -0
- package/dist/assets/{Preview-OiplHjn8.js → Preview-BBgrn4cd.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-B8QVReQm.js → QBOConnectionScreen-CWE_gavn.js} +1 -1
- package/dist/assets/{ReferralListScreen-Cnd7u4T9.js → ReferralListScreen-B51q6tuc.js} +2 -2
- package/dist/assets/ReimbursementApprovalRoutes-CX0ljo0U.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BgYFphfr.js → ReimbursementApprovalRuleDetailScreen-BY8AWRBv.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BeD0lwna.js → ReimbursementRoutes-BNT5fCZV.js} +5 -5
- package/dist/assets/{ReportsRoutes-CPI-jy1F.js → ReportsRoutes-BkcfE81W.js} +1 -1
- package/dist/assets/RewardsRoutes-Bp0jvJUz.js +1 -0
- package/dist/assets/{ScreenRoutes-B24ySlpK.js → ScreenRoutes-DzWi1qtt.js} +2 -2
- package/dist/assets/SettingsRoutes-C45RXj_4.js +57 -0
- package/dist/assets/{SetupPagesScreen-DtddTp_T.js → SetupPagesScreen-CnApuu2-.js} +5 -5
- package/dist/assets/SignInScreen-D4fYBdSr.js +1 -0
- package/dist/assets/{SignOutScreen-Djs9TXWR.js → SignOutScreen-scofbvIC.js} +1 -1
- package/dist/assets/{TaskListScreen-DMgU1v4z.js → TaskListScreen-5M_H_3yt.js} +2 -2
- package/dist/assets/{TaskRoutes-Cmtr7KFm.js → TaskRoutes-Bc8V0KLM.js} +2 -2
- package/dist/assets/{TransactionDetailRoutes-CjrDVjtT.js → TransactionDetailRoutes-lhjQfiA2.js} +1 -1
- package/dist/assets/TransactionDetailScreen-advW0sri.js +5 -0
- package/dist/assets/{TransactionListRoutes-uZihQK3F.js → TransactionListRoutes-BTVDW0ac.js} +1 -1
- package/dist/assets/{TreasuryRoutes-ZtY_hGM6.js → TreasuryRoutes-BlM-Juxy.js} +6 -6
- package/dist/assets/{VendorsRoutes-DcUkIEvd.js → VendorsRoutes-Db2Ed2Fz.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-8khqAoaZ.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-Cbm2k-08.js → ZeniAccountRoutes-68W3Grg4.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-CCwshkYl.js +9 -0
- package/dist/assets/{accountMappingHelper-DDqSB3xQ.js → accountMappingHelper-DoYWzqd9.js} +1 -1
- package/dist/assets/{analytics-DoyQ8ezf.js → analytics-DVTbnjlr.js} +1 -1
- package/dist/assets/{analyticsHelper-CvGdvadP.js → analyticsHelper-7imjYGd-.js} +1 -1
- package/dist/assets/{core-CQnSJ9vO.js → core-k_c8SCBE.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BprI0TcI.js → decodeURIComponentSafe-ClSfwHJC.js} +1 -1
- package/dist/assets/{dnd-DoHm848q.js → dnd-CKEs-Nbe.js} +1 -1
- package/dist/assets/{empty-BZMPWXIo.js → empty-CaaFsHZq.js} +1 -1
- package/dist/assets/{empty-DjW_4H8B.js → empty-rBU__xZH.js} +1 -1
- package/dist/assets/{emptyVideoElement-CD9clJu_.js → emptyVideoElement-BiPjnR5F.js} +1 -1
- package/dist/assets/{epic-2G17lmbK.js → epic-BY3t4hzo.js} +2 -2
- package/dist/assets/getLocaleForTenant-BWdefIGu.js +1 -0
- package/dist/assets/{index-BtlQ6O6E.js → index-B0M_M2si.js} +1 -1
- package/dist/assets/{index-CF7DasjB.js → index-C9JBC9EP.js} +1 -1
- package/dist/assets/{index-Ci7GqulV.js → index-CAPOi0Fj.js} +1 -1
- package/dist/assets/{index-C6MtcitK.js → index-CBl-jehm.js} +1 -1
- package/dist/assets/{index-W83PhAZh.js → index-Cm2LZphQ.js} +12999 -13025
- package/dist/assets/{index-B6GtF9yZ.js → index-CrxfuqRy.js} +2 -2
- package/dist/assets/{index-DgHQU_66.js → index-D7n4W-6R.js} +1 -1
- package/dist/assets/{index-KsPtT3xm.js → index-_Ds-L3qG.js} +1 -1
- package/dist/assets/{lexical-WXHH1XHj.js → lexical-k-PQZXkn.js} +1 -1
- package/dist/assets/{liveblocks-DvKPzrwo.js → liveblocks-D3ESVZyk.js} +1 -1
- package/dist/assets/{lottie-DNsrs-P3.js → lottie-BYni7Ovk.js} +1 -1
- package/dist/assets/{mui-sKCdI-e6.js → mui-UJrLjp1k.js} +1 -1
- package/dist/assets/{pathToGoBack-DDBtlyQ4.js → pathToGoBack-D0Z5Ycmy.js} +1 -1
- package/dist/assets/{pdf-iXI4qQyj.js → pdf-CaeTpLUv.js} +4 -4
- package/dist/assets/{pdf-lib-C9eLuUx2.js → pdf-lib-Cgly_u4z.js} +1 -1
- package/dist/assets/{plaid-BOu_8LCE.js → plaid-B1j5PXHV.js} +1 -1
- package/dist/assets/{pusher-BxMucY8d.js → pusher-IzmLENf0.js} +1 -1
- package/dist/assets/{react-BfWAIeRe.js → react-BPazXlgj.js} +1 -1
- package/dist/assets/{react-Bfv7BUzV.js → react-BhDdWL-M.js} +1 -1
- package/dist/assets/{react-CHbhfie6.js → react-Cbn9UGi3.js} +1 -1
- package/dist/assets/{react-DW2tK8z_.js → react-D9CNJCXY.js} +1 -1
- package/dist/assets/{react-BY08R1tD.js → react-RV2byy3l.js} +1 -1
- package/dist/assets/{react-DVBLaOmV.js → react-iNsCZPRe.js} +1 -1
- package/dist/assets/{recharts-Cv5d-Vxs.js → recharts-Q-kkTNuO.js} +1 -1
- package/dist/assets/{routePaths-stnXzrYV.js → routePaths-d7Ok-gzv.js} +1 -1
- package/dist/assets/{sentry-Be8twC83.js → sentry-B_92GPgU.js} +1 -1
- package/dist/assets/{url-CuDHWvgT.js → url-CGw_V4gG.js} +1 -1
- package/dist/assets/{url-AlENSCVt.js → url-DLQKrj-e.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CKfyn0VP.js → useAiCfoDashboardSuggestedQuestionsChips-D_8fZhjX.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-j-YNVdB5.js +1 -0
- package/dist/assets/useCashManagementBanner-Dq8PXuUm.js +1 -0
- package/dist/assets/{useDeviceId-KC-rY1dP.js → useDeviceId-BE1s-3Wf.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BDAn-AM4.js → useInitialThreadRequest-DoCqWgSy.js} +1 -1
- package/dist/assets/{utils-BcJ2NV01.js → utils-Mjhh9T8E.js} +1 -1
- package/dist/assets/withTransactionSidePanel-AeDcEPW-.js +21 -0
- package/dist/assets/{zeni-epic-state-DKeO4Z0C.js → zeni-epic-state-C3zBO1No.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-gPXkxz7s.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DO3NyaR6.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-Bx2DINVR.js +0 -18
- package/dist/assets/DrawerScreen-BtLrlXnn.js +0 -1
- package/dist/assets/EntityDetailRoutes-CTo7No6n.js +0 -1
- package/dist/assets/FeaturePreviewScreen-9NvuDbvP.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-CTkVv0M2.js +0 -12
- package/dist/assets/NotFoundScreen-FcrdBNP0.js +0 -1
- package/dist/assets/OAuthConsentScreen-Swpq9wju.js +0 -1
- package/dist/assets/PerformanceRoutes-VzYGFOXy.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-DOhkjING.js +0 -1
- package/dist/assets/RewardsRoutes-Vdol6ACr.js +0 -1
- package/dist/assets/SettingsRoutes-D7qVKl5_.js +0 -57
- package/dist/assets/SignInScreen-u3NwSgsj.js +0 -1
- package/dist/assets/TransactionDetailScreen-ABqf1zzA.js +0 -5
- package/dist/assets/WiseConfirmationScreen-DYcjQlfc.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-Ciuw5n7i.js +0 -9
- package/dist/assets/getLocaleForTenant-CAvD8CfA.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DAlpTVgV.js +0 -1
- package/dist/assets/useCashManagementBanner-D8slgHwh.js +0 -1
- package/dist/assets/withTransactionSidePanel-B9fglQqM.js +0 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-D3ESVZyk.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-k_c8SCBE.js";import{LN as k,LO as v,LP as T,A_ as A,AM as M,LQ as B,LR as oe,LS as ie,AQ as se,fa as $,AX as le,AU as re}from"./zeni-epic-state-C3zBO1No.js";import{h as g,o as r,i as de,c as j,f as G,k as ce,p as me,y as pe,n as V,N as ue,x as he,C as xe,Y as ge,m as fe,q as we,B as be,r as Se,M as ye,S as ke,v as ve,w as je,A as $e}from"./index-Cm2LZphQ.js";import{n as m}from"./mui-UJrLjp1k.js";import f from"./NotFoundScreen-DpHt-tQH.js";import{a as I}from"./sentry-B_92GPgU.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.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]="c6cd6ad0-bbea-473a-994f-a57d39fe55e9",e._sentryDebugIdIdentifier="sentry-dbid-c6cd6ad0-bbea-473a-994f-a57d39fe55e9")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -7,7 +7,7 @@ import{j as a}from"./liveblocks-DvKPzrwo.js";import{i as S,n as x,h as C,g as y,
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
9
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
-
`,Ce=x(function(e){const t=k(e),n=v(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:
|
|
10
|
+
`,Ce=x(function(e){const t=k(e),n=v(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(M(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(A(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Ae=m.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
height: 100vh;
|
|
13
13
|
width: 100%;
|
|
@@ -16,7 +16,7 @@ import{j as a}from"./liveblocks-DvKPzrwo.js";import{i as S,n as x,h as C,g as y,
|
|
|
16
16
|
align-items: center;
|
|
17
17
|
background-color: ${e=>e.theme.colors.grey4};
|
|
18
18
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
-
`,Be=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:B(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,
|
|
19
|
+
`,Be=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:B(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Le();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Pe(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}})(ce);function De({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(Ae,{windowSize:o,children:a.jsx(Be,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Le=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Pe=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}),ze=m.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
height: 100%;
|
|
22
22
|
width: 100%;
|
|
@@ -25,7 +25,7 @@ import{j as a}from"./liveblocks-DvKPzrwo.js";import{i as S,n as x,h as C,g as y,
|
|
|
25
25
|
align-items: center;
|
|
26
26
|
background-color: ${e=>e.theme.colors.grey4};
|
|
27
27
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
-
`,Ne=x(function(e){const t=k(e),n=v(e),o=B(e),{companyName:
|
|
28
|
+
`,Ne=x(function(e){const t=k(e),n=v(e),o=B(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(M(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(T({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 Ee(){const e=C(),t=y(),n=g(),{vendorId:o,billId:i}=S();return o==null||i==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(ze,{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%;
|
|
@@ -34,7 +34,7 @@ import{j as a}from"./liveblocks-DvKPzrwo.js";import{i as S,n as x,h as C,g as y,
|
|
|
34
34
|
align-items: center;
|
|
35
35
|
background-color: ${e=>e.theme.colors.grey4};
|
|
36
36
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
-
`,Te=x(function(e){const t=k(e),n=v(e),o=B(e),{companyName:
|
|
37
|
+
`,Te=x(function(e){const t=k(e),n=v(e),o=B(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=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(s,"international",i,l,t.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 Me(){const e=C(),t=y(),n=g(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Ge={containerWidth:new je(100,58)},Ve=m(ke)`
|
|
38
38
|
width: ${r.sp4};
|
|
39
39
|
height: ${r.sp4};
|
|
40
40
|
margin-bottom: ${r.sp3};
|
|
@@ -43,14 +43,14 @@ import{j as a}from"./liveblocks-DvKPzrwo.js";import{i as S,n as x,h as C,g as y,
|
|
|
43
43
|
cursor: pointer;
|
|
44
44
|
position: absolute;
|
|
45
45
|
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,
|
|
46
|
+
`,_e=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
|
+
`,He=m.div`
|
|
54
54
|
display: flex;
|
|
55
55
|
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
56
|
flex-direction: column;
|
|
@@ -58,7 +58,7 @@ import{j as a}from"./liveblocks-DvKPzrwo.js";import{i as S,n as x,h as C,g as y,
|
|
|
58
58
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
59
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
60
|
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
-
`,
|
|
61
|
+
`,Ke=m.div`
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
64
64
|
align-items: center;
|
|
@@ -69,4 +69,4 @@ import{j as a}from"./liveblocks-DvKPzrwo.js";import{i as S,n as x,h as C,g as y,
|
|
|
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
|
+
`,Ue=x(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=ae(),d=s.get("token"),_=n.pathname.includes("address"),w=g(),H=ge(),D=fe(),b=we(),K=()=>{H.toggle()},U=E(u=>k(u)),W=E(u=>v(u)),{authParams:O,fetchState:c,billAttachment:q,billFetchState:L,companyName:J,currencySymbol:Q,amount:R}=U,{tenantId:P,userId:z,sessionId:N}=O,{fetchState:X,internationalBankAccountCreateStatus:Y}=W;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&t(le(i,o,d))},[b,c,i,o,d,t]),I.useEffect(()=>{b&&c==="Completed"&&($(z,N,P),l!=null&&t(re(l)))},[c,b,z,N,P,l,t]),c==="Error"?a.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&L==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",J,l??"",We(n.pathname),Q,R))(u)}),a.jsxs(_e,{windowSize:w,children:[w!=="small"?a.jsx(Ve,{onClick:K}):null,a.jsx(Ke,{windowSize:w,isAddressPage:_,children:L==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(Ue,{file:q,type:"bill"})}),a.jsx(He,{windowSize:w,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Oe(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Oe,{})}),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(De,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Me,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-D3ESVZyk.js";import{a as g}from"./sentry-B_92GPgU.js";import{u as U,g as _,h as w,t as M,j as l,N as D}from"./core-k_c8SCBE.js";import{z as r,m as P,D as V,d as A,c as N,e as J,J as W,M as K,g as R}from"./index-Cm2LZphQ.js";import{eW as Y,Ly as $,LI as q,Lz as B,fa as G,fD as H,LE as Q,gn as X,cY as Z,LJ as ee,LK as te}from"./zeni-epic-state-C3zBO1No.js";import{n as ne}from"./mui-UJrLjp1k.js";import{u as ae}from"./useDeviceId-BE1s-3Wf.js";import{f as se}from"./analyticsHelper-7imjYGd-.js";import{t as ie}from"./getLocaleForTenant-BWdefIGu.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="8a3d01d4-cde1-4f2e-bdfa-ac98a0240203",t._sentryDebugIdIdentifier="sentry-dbid-8a3d01d4-cde1-4f2e-bdfa-ac98a0240203")}catch{}})();const z=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function ze(){const t=U(),s=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:T,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),a=l(e=>e.tenantState.loggedInUser),o=l(e=>Y(e)),y=l(e=>$(e)),E=r.getSignedInUser(),L=P().mode;g.useEffect(()=>{a?.zeniSessionId==null&&n!=null&&z(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,f)))},[n,p,t,i,f,a?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&b!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(B(y.tenantsInOrder),a.zeniSessionId),G(a.userId,a.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),V.updateAppLocaleID(ie(o)),se(a,o,L,void 0,y.tenantsInOrder),X().then(()=>{const e=R();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(J.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,b,a,o,y,L,s.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),F=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(W,{phoneNumber:T,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(I==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||E!=null){const e=s.state?.origin??"/";return u.jsx(D,{to:e,state:{...s.state,origin:""}})}if(!z(n,p)||f==null||h==="Error"){const e=s.state?.origin??"/",v=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(D,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:v,magicLinkExpired:!v&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(K,{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{ze as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as V}from"./liveblocks-
|
|
1
|
+
import{j as V}from"./liveblocks-D3ESVZyk.js";import{a as c}from"./sentry-B_92GPgU.js";import{u as be,j as s,i as Ze,g as Je,h as Ke,l as P}from"./core-k_c8SCBE.js";import{eW as he,ff as Qe,fg as Se,f1 as Xe,bn as ea,eV as aa,fh as ta,fi as na,fk as sa,fn as oa,fw as ia,fo as g,fq as ra,fr as ue,fu as da,fs as la,ft as ca,fv as ua,cO as fa,fy as ma,cT as pa,bt as ba,f0 as ha,fD as Sa,fE as ga,fC as Ea}from"./zeni-epic-state-C3zBO1No.js";import{a7 as ka,a8 as Ca,Y as ya,N as Ia,z as k,q as Ta,u as wa,x as r,a9 as Aa,aa as _a,j as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ma,ae as fe,af as me,L as xa,ag as Pa,ah as pe,c as R,$ as Ra,n as A,ai as N,aj as Na}from"./index-Cm2LZphQ.js";import{D as Va}from"./mui-UJrLjp1k.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]="53d767e2-5c89-4054-8186-761fa5729507",f._sentryDebugIdIdentifier="sentry-dbid-53d767e2-5c89-4054-8186-761fa5729507")}catch{}})();const Ua=ka(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ze(),a=Je(),C=ya(),o=Ke(),U=Xe(),m=be(),{useFeatureGate:i}=Ia(),G=k.getSignedInUser(),_=ea(G),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,O=s(e=>aa(e)),j=O.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[F,L]=c.useState(void 0),D=P("/:tenantEmailDomain/dashboard")!==null,z=P("/:tenantEmailDomain/reports")!==null,I=P("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:q}=i(r.isDebitCardFeatureEnabled),Ce=Aa(n,ke,q),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),H=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Z}=i(r.isExpenseAutomationEnabledV2),J=Z||W&&_,{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=_||!_&&$e,Me=n.company!=null&&ia(n.company),w=ve&&Me,xe=s(e=>g(e).totalUnreadCount),Pe=s(e=>g(e).reducedFetchCountState),K=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&U.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ve={fetchStatus:Pe,count:xe},ne=t!=null?k.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),J===!1&&S.push("expense_automation_card");const Ue=Fa(),oe=s(e=>la(e,S,h,Z,W,w).fetchState),ie=s(e=>ca(e).fetchState),Ge=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Oe=c.useMemo(()=>ua(n.userRole),[n.userRole]),je=fa(Oe),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&H.fetchState==="Completed"&&ma(H.notificationSettings,h.userEmail,q,n),re=Da(),Ye=re&&va(a),de=pa(Ue?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,M=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[qe,ce]=c.useState(M);c.useEffect(()=>{ce(M())},[M]);const He=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,We=Ba(He);return V.jsx(Va,{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(Ma,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Ge,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:je,isZeniAccountEnabled:Y,isChargeCardEnabled:Ce,isTreasuryEnabled:w,treasuryYieldPercentage:We,isTreasuryPopupVisible:qe,isNotificationsTabVisible:ze,notificationCountDetails:Ve,isExpenseAutomationEnabledForUser:J&&ba(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=K===0&&Q>0?"notifications/comments":"notifications/tasks";me(a)&&(e=K===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(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(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!ge)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),p&&E[n.tenantId]!=null){const b=E[n.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Na(e.type);pe(e.type)?(j!=null&&m(Ea()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${x}`,{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=>{Ee(xa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let p=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Pa(l)?p+="settings/my_profile":pe(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const b=e;R.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),qa=f=>{const d=be(),t=s(C=>he(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ca(o)&&Qe(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ua,{...f,...a})};export{qa as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-D3ESVZyk.js";import{h as r,n}from"./core-k_c8SCBE.js";import{I as i}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.js";import"./sentry-B_92GPgU.js";import"./zeni-epic-state-C3zBO1No.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.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]="a91be54e-6c13-4a77-b876-d2a39d3636be",o._sentryDebugIdIdentifier="sentry-dbid-a91be54e-6c13-4a77-b876-d2a39d3636be")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as
|
|
1
|
+
import{l as ct,a as dt,m as mt,j as E}from"./liveblocks-D3ESVZyk.js";import lt from"./NotFoundScreen-DpHt-tQH.js";import{a as k}from"./sentry-B_92GPgU.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 z}from"./core-k_c8SCBE.js";import{cv as St,fh as O,eW as J,fv as bt,fo as b,Su as Q,fr as m,fg as y,sk as M,xG as It,Sv as Ct,ff as Tt,fy as yt,sp as _t,Sw as $,bq as F,f9 as w,st as K,Sx as At,cH as Et,cA as Nt}from"./zeni-epic-state-C3zBO1No.js";import{X as xt,z as Bt,N as wt,x as vt,_ as Rt,cU as Ut,n as N,a7 as Dt,cV as Gt,a8 as Pt,p as $t}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-j-YNVdB5.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.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]="2d6ae703-c00a-4a2b-afb3-b67dadfc380d",t._sentryDebugIdIdentifier="sentry-dbid-2d6ae703-c00a-4a2b-afb3-b67dadfc380d")}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=O(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=J(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:x,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,d,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"}})}d==="unread"&&t(K("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,d)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){d==="unread"&&(x(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(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(m(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const d=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(d,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const d=[];o==="all"?d.push("read","unread"):o!=="mentions"&&d.push(o),t(M("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(a,o,d,c)=>{a==="tasks"?t(K("task_manager",d,c)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{d==="read"&&(x(r),t($([r],F())))})).then(()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({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")),Mt(s,x).then(()=>{t($(s,F())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(m({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({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}})}}})(Dt(Gt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,v]=k.useState(!1),a=S(e=>O(e)),o=S(e=>J(e)),{useFeatureGate:d}=wt(),{isFeatureEnabled:c}=d(vt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Y=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),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=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=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:W,isLoading:q,fetchMore:H,isFetchingMore:L,hasFetchedAll:X}=dt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Q(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),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 G=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{G&&U!=="In-Progress"?s(m({fetchState:"In-Progress",error:void 0},"comments")):G||U!=="In-Progress"||s(m({fetchState:"Completed",error:void 0},"comments"))},[G,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(v(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&q===!1&&B!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=W.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||X===!0||H==null||H(),null)}).filter(f=>f!=null);s(m({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,L,C,X,q,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];R==="all"?A.push("read","unread"):R!=="mentions"&&A.push(R),s(M("task_manager",T,A,!0))}}}},nt=mt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(z,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(z,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as m}from"./liveblocks-D3ESVZyk.js";import{a as r}from"./sentry-B_92GPgU.js";import{u as T,g as A,j as o,N as j}from"./core-k_c8SCBE.js";import{LX as C,eW as P,fn as x,LY as z,LZ as D,L_ as M,L$ as R,o5 as k,KU as N}from"./zeni-epic-state-C3zBO1No.js";import{z as h,F as I}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="f7dad8ff-7533-4039-8f2d-f5d101dbcae5",n._sentryDebugIdIdentifier="sentry-dbid-f7dad8ff-7533-4039-8f2d-f5d101dbcae5")}catch{}})();function ee(){const n=T(),s=A(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),y=o(z),v=o(D),u=o(M),[S,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[f,a,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(L=>L.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),c=S??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(N(a.userId,a.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(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-C3Yczwgv.js → PandLWithForecastRoutes-BnZrz52M.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-D3ESVZyk.js";import{h as z,u as J,g as X,i as Z,j as d,n as H,o as K,p as I}from"./core-k_c8SCBE.js";import{eW as M,s8 as P,rI as Q,Ms as O,rD as S,bt as ee,bn as ae,bY as te,rE as se,Mt as oe,Mf as C,dJ as re,vD as ne,Mu as ie,v_ as ce,fe as le,fc as de}from"./zeni-epic-state-C3zBO1No.js";import{z as me,X as fe,_ as pe,j as ue,N as U,x as w,r as he,c as _,ao as ge,n as Fe}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.js";import be from"./NotFoundScreen-DpHt-tQH.js";import{F as Ie}from"./FeaturePreviewScreen-C_7xKfC9.js";import{a as g}from"./sentry-B_92GPgU.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-j-YNVdB5.js";import{u as Se}from"./useInitialThreadRequest-DoCqWgSy.js";import{t as Te}from"./routePaths-d7Ok-gzv.js";import{M as ye}from"./MobileAppDrawer-B2Mj3GDG.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.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]="4ba68df2-132d-485d-8d1e-f6db215d01aa",s._sentryDebugIdIdentifier="sentry-dbid-4ba68df2-132d-485d-8d1e-f6db215d01aa")}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})}},xe=H(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:_}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(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,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{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 v(){const s=z(),e=J(),a=X(),{forecastId:o,tenantEmailDomain:r}=Z(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>M(t)),$=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),D=d(t=>t.reportUIOptionsState.selectedForecast),A=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:B}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(Q());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,D?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(e(O(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!A(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,S,F]);const k=ue(),W=k?.loggedInUserRole!=null&&ee(k.loggedInUserRole),{useFeatureGate:q}=U(),{isFeatureEnabled:j}=q(w.isReportsCommentingEnabled),G=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[V,Y]=g.useState(!1),E=t=>{Y(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:_,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:E}),n.jsx(xe,{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:W,isAiCfoAccessEnabled:N,onAskAiCfoClick:B,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ye(){const s=d(i=>M(i)),{useFeatureGate:e}=U(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(K,{children:[n.jsx(I,{path:"/",element:n.jsx(v,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-D3ESVZyk.js";import{Mo as te,eW as X,ks as G,fe as J,fc as ne,JS as Q,M2 as oe,uB as Ee,Mp as N,uq as ke,uK as Ie,uE as ie,uu as re,uI as Pe,uF as je,Mq as le,wp as Te,ga as Le,gd as ve,Mr as M,uy as de,ux as ce,uN as Fe,c7 as Ae}from"./zeni-epic-state-C3zBO1No.js";import{h as pe,N as Y,x as E,z as K,a9 as ue,E as me,ak as ge,al as Re,w as he,o as R,Q as fe,D as Ce,am as Oe,X as Ve,_ as Ue,r as Be,c as be,e as Ze,n as $e,an as Me,j as _e}from"./index-Cm2LZphQ.js";import{D as ye,n as H,S as we}from"./mui-UJrLjp1k.js";import ae from"./NotFoundScreen-DpHt-tQH.js";import{a as r}from"./sentry-B_92GPgU.js";import{u as ee,i as ze,j as m,h as Ge,g as Ke,n as He,o as se,p as $}from"./core-k_c8SCBE.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-j-YNVdB5.js";import{M as qe}from"./MobileAppDrawer-B2Mj3GDG.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="320ea3c4-a987-4789-bd5c-b842b4807e81",a._sentryDebugIdIdentifier="sentry-dbid-320ea3c4-a987-4789-bd5c-b842b4807e81")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>X(e)),D=m(e=>G(e)),{useFeatureGate:f}=Y(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=J(k,u),L=ne(u),v=Q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Je,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Je=H(we)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -15,8 +15,8 @@ import{j as s}from"./liveblocks-DvKPzrwo.js";import{Mo as te,eW as Q,ks as z,fe
|
|
|
15
15
|
margin-bottom: 30px;
|
|
16
16
|
margin-top: ${R.sp4};
|
|
17
17
|
white-space: pre-line;
|
|
18
|
-
`,
|
|
18
|
+
`,Qe={overlayWidth:new he(100,100,48)},z=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>X(i)),u=m(i=>G(i)),{useFeatureGate:D}=Y(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=J(f,d),P=ne(d),L=Q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:z.discardTitle}),descriptionComponent:s.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=H(we)`
|
|
19
19
|
display: flex;
|
|
20
20
|
min-height: 100%;
|
|
21
21
|
flex-direction: column;
|
|
22
|
-
`,aa=He(function(a,t){const l=le(a),n=
|
|
22
|
+
`,aa=He(function(a,t){const l=le(a),n=K.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(M({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(M({searchText:o}))}}}})(Me);function q({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=Ke(),{areTenantIdsInSync:o}=Ve(),y=K.getSignedInUser(),h=m(e=>X(e)),{useFeatureGate:p}=Y(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>G(e)),I=!J(O,h)&&V,w=Q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(M({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(M({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Ye,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Xe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(qe,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(M({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(q,{})}),s.jsx($,{path:"new",element:s.jsx(q,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(q,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-D3ESVZyk.js";import E from"./NotFoundScreen-DpHt-tQH.js";import{a as r}from"./sentry-B_92GPgU.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 b}from"./core-k_c8SCBE.js";import{eW as B,Sy as h,bo as F,bn as N,i9 as V,f9 as W}from"./zeni-epic-state-C3zBO1No.js";import{Y,z as I,_ as $,cW as q}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-j-YNVdB5.js";import{M as H}from"./MobileAppDrawer-B2Mj3GDG.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.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]="b08c75bb-a89c-4ee2-87a6-477535b51d7a",e._sentryDebugIdIdentifier="sentry-dbid-b08c75bb-a89c-4ee2-87a6-477535b51d7a")}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}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(q),K=()=>{const e=_(),t=v(),c=Y(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>h(a)),{tenantEmailDomain:u}=M(),f=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,y=N(d),x=C||k||y,l=r.useCallback((a,i,T)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(W({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"||l(a,i,!0),m.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(b,{path:"*",element:s.jsx(K,{})}),s.jsx(b,{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-B_92GPgU.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-D3ESVZyk.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-B_92GPgU.js";import{L as dt,bY as Tc,eW as Ac,Ly as Rc,M0 as kl,c7 as Tl,fD as Al,fE as Rl}from"./zeni-epic-state-C3zBO1No.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-Mjhh9T8E.js";import{r as un}from"./empty-rBU__xZH.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-Cgly_u4z.js";import{r as Gl}from"./index-B0M_M2si.js";import{r as zl}from"./index-D7n4W-6R.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-k_c8SCBE.js";import{u as Kl,z as Pc,L as Wl,G as Jl,H as Xl,f as Ql,c as tf}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.js";import{d as Pe}from"./decodeURIComponentSafe-ClSfwHJC.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]="12f8d14f-6460-4186-b965-d6c4c713c04b",t._sentryDebugIdIdentifier="sentry-dbid-12f8d14f-6460-4186-b965-d6c4c713c04b")}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,5 +1,5 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-D3ESVZyk.js";import{a as o}from"./sentry-B_92GPgU.js";import{j as f,h as V,u as _,g as H,n as W}from"./core-k_c8SCBE.js";import{m as F,h as M,z as R,bb as U,w as N,X as $,_ as z,r as X,c as l,e as q,a7 as G,bc as J}from"./index-Cm2LZphQ.js";import{fi as K,eW as Q,OS as P,OT as Y,vt as Z,vj as g,fk as ee,bS as ae,vo as re,OU as ne}from"./zeni-epic-state-C3zBO1No.js";import{D as te,e as se,n as oe,S as ie}from"./mui-UJrLjp1k.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-j-YNVdB5.js";import{M as ce}from"./MobileAppDrawer-B2Mj3GDG.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]="6fbc1a05-b3ce-4042-91b3-da8e8f605448",e._sentryDebugIdIdentifier="sentry-dbid-6fbc1a05-b3ce-4042-91b3-da8e8f605448")}catch{}})();const de={overlayWidth:new N(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=F(),n=M();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>K(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",we=W(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(
|
|
5
|
+
`,I="refer-and-earn-status-update",we=W(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(G(J));function Se({isReferralDrawerOpen:e}){const a=V(),r=_(),n=H(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>Q(t)),b=f(t=>P(t)),m=b.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),v=Y([b,p]),{areTenantIdsInSync:d}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&d&&(u(!0),r(g(!0)))},[m,r,d]),o.useEffect(()=>{!c&&p.fetchState==="Not-Started"&&d&&(x(!0),r(ee(!0)))},[p,r,d]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),S=t=>{A(t)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:T}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:v===!0});const L={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,y,B)=>{B.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[v===!0?s.jsx(X,{analytics:l,onLoad:t=>(y=>{w!=null&&y.trackPageLoaded(q.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:S}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{S(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:T,...L})]})}export{Se as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-D3ESVZyk.js";import P from"./NotFoundScreen-DpHt-tQH.js";import{a as l}from"./sentry-B_92GPgU.js";import{h as E,g as x,u as C,j as u,N as k,n as D,o as z,p as v}from"./core-k_c8SCBE.js";import{eW as j,PM as b,Q0 as S,Fi as V,Eo as T,Fh as d,F5 as U,Qg as B,F8 as Q}from"./zeni-epic-state-C3zBO1No.js";import{m as N,z as O,B as W,a7 as $,bW as K,af as F,bz as M,bX as X}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.js";import{R as A}from"./ReimbursementApprovalRuleDetailScreen-BY8AWRBv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="e999cce5-bcf7-46f2-a0bb-b108d0eb7760",e._sentryDebugIdIdentifier="sentry-dbid-e999cce5-bcf7-46f2-a0bb-b108d0eb7760")}catch{}})();const w="reimbursement-approval-rule-update",q=D(function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:t,location:i}=r;return{onApprovalRulesEventReceived:a=>{a.endsWith(w)&&e(B(!1))},onBackClick:()=>{F(i)?t("../../"):t("../../../reimbursements/setup")},onDeleteRuleClick:a=>{e(U(a,!1))},onEditRuleClick:a=>{a!=null?(e(d(a)),t(`./${a}/edit`)):(e(d()),t("./new"))}}})($(K)),G=()=>{const e=E(),r=x(),t=C(),[i,a]=l.useState(!1),[o,h]=l.useState(!1),m=u(n=>n.remiSetupApproverViewState.fetchState),p=u(n=>j(n)),g=N(),c=u(n=>b(n)),f=u(n=>S(n).remiSetupApproverViewUpdateData);if(l.useEffect(()=>{f?.updateStatus.fetchState==="Completed"&&t(V())},[f]),l.useEffect(()=>{i||m!=="Not-Started"||(a(!0),t(T(!0,!1,!1,!1)))},[i,m,t]),O.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");l.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(o||(h(!0),t(d())),e("./new"))},[o,c,t]);const R={events:p.companyId!=null?[`private-encrypted-${p.companyId}.${w}`]:[],eventCallback:(n,_,y)=>{n.endsWith(w)&&y.onApprovalRulesEventReceived(n)}};return p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?s.jsx(k,{to:"../../promo"}):p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||c.fetchState!=="Completed"&&c.fetchState!=="Error"?s.jsx(W,{fetchState:"In-Progress",style:{backgroundColor:g.colors.grey5}}):s.jsx(q,{currentTenant:p,location:r,navigate:e,...R})},I="reimbursement-approval-rule-update",H=D(function(e){const r=b(e),t=S(e).remiSetupApproverViewUpdateData,i={};for(const o of Object.values(e.contactState.contactById))o?.id!=null&&(i[o.id]=o.fullName);const a={};for(const o of Object.values(e.classState.classesByKey))o?.classId!=null&&(a[o.classId]=o.className);return{approvalView:r,remiSetupApproverViewUpdateData:t,vendorNamesById:i,departmentNamesById:a}},function(e,r){const{navigate:t,location:i}=r;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(B(!1))},onBackClick:()=>{F(i)?t("../../"):t("../../../reimbursements/setup")},onDeleteRuleClick:a=>{e(U(a,!0))},onEditRuleClick:a=>{a!=null?(e(d(a)),t(`./${a}/edit`)):(e(d()),t("./new"))},onReorderRules:a=>{e(Q(a,!0))}}})($(X)),J=()=>{const e=u(t=>j(t)),{isApprovalRulesV3Enabled:r}=M(e?.tenantId);return r?s.jsx(L,{}):s.jsx(G,{})},L=()=>{const e=E(),r=x(),t=C(),[i,a]=l.useState(!1),[o,h]=l.useState(!1),m=u(n=>n.remiSetupApproverViewState.fetchState),p=u(n=>j(n)),g=N(),c=u(n=>b(n)),f=u(n=>S(n).remiSetupApproverViewUpdateData);if(l.useEffect(()=>{f?.updateStatus.fetchState==="Completed"&&t(V())},[f]),l.useEffect(()=>{i||m!=="Not-Started"||(a(!0),t(T(!0,!1,!1,!0)))},[i,m,t]),O.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");l.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(o||(h(!0),t(d())),e("./new"))},[o,c,t]);const R={events:p.companyId!=null?[`private-encrypted-${p.companyId}.${I}`]:[],eventCallback:(n,_,y)=>{n.endsWith(I)&&y.onApprovalRulesEventReceived(n)}};return p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?s.jsx(k,{to:"../../promo"}):p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||c.fetchState!=="Completed"&&c.fetchState!=="Error"?s.jsx(W,{fetchState:"In-Progress",style:{backgroundColor:g.colors.grey5}}):s.jsx(H,{currentTenant:p,location:r,navigate:e,...R})};function oe(){return s.jsxs(z,{children:[s.jsx(v,{path:"/",element:s.jsx(J,{})}),s.jsx(v,{path:"/new",element:s.jsx(A,{})}),s.jsx(v,{path:"/:approvalRuleId/edit",element:s.jsx(A,{})}),s.jsx(v,{path:"*",element:s.jsx(P,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as y}from"./liveblocks-D3ESVZyk.js";import{a as b}from"./sentry-B_92GPgU.js";import{h as _,u as C,g as O,i as k,j as R,n as F}from"./core-k_c8SCBE.js";import{Q0 as E,PM as T,Fb as V,Fk as j,Fi as A,Fj as w,Q1 as B,eW as M,Fh as Q}from"./zeni-epic-state-C3zBO1No.js";import{z as N,m as P,B as $,bM as W,af as q,bz as K,bN as L}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.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]="8b0ab5bb-e73b-4fa0-9f53-bfb1e3593b2f",e._sentryDebugIdIdentifier="sentry-dbid-8b0ab5bb-e73b-4fa0-9f53-bfb1e3593b2f")}catch{}})();const G=F(function(e,s){const t=E(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",r=o==="approval_create"&&t.allApprovalRules.length!==0;let n=t.allApprovalRules.length===0;return s.approvalRuleId&&(n=t.allApprovalRules.findIndex(p=>p.approvalRuleId===s.approvalRuleId)===0),{localData:t,hideUpperBoundField:r,isLowerBoundDisabled:n,approvalUpdateActionType:o}},function(e,s){const{navigate:t,approvalUpdateDataView:o,approverViewData:r,approvalRuleId:n}=s,p=o.remiSetupApproverViewUpdateData?.type,i=q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const g=[];return v.forEach(u=>{const S=u.actors.selectedUsers.map(f=>({type:"user",subType:void 0,userId:f.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(f=>{const m=(h=f.value,B(h)==null);var h;return{type:m?"attribute":"role",subType:f.value,userId:void 0,idType:void 0,isImplicitActor:!m}}),c=S.concat(I);g.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g},l={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(p==="approval_create"){const v={criteria:l,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}else{const v={approvalRuleId:n,criteria:l,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}},onResetClick:()=>{e(A()),p==="approval_update"||i?t("../"):r.allApprovalRules.length===0&&r.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),p==="approval_update"||i?t("../"):r.allApprovalRules.length===0&&r.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}})(W);function H(){const e=_(),s=C(),t=O(),{approvalRuleId:o}=k(),r=N.getSignedInUser(),n=P(),p=R(l=>E(l)),i=R(l=>T(l)),[a,d]=b.useState(!1);if(b.useEffect(()=>{a||(d(!0),s(V(!0)))}),b.useEffect(()=>{i.fetchState==="Not-Started"&&e(o!=null?"../../":"../")},[i,o]),r==null)throw Error("Can't access address page without signing in...");return p.approversDetailsFetchStatus.fetchState=="Not-Started"||p.approversDetailsFetchStatus.fetchState==="In-Progress"?y.jsx($,{fetchState:p.approversDetailsFetchStatus.fetchState,style:{backgroundColor:n.colors.grey5}}):y.jsx(G,{navigate:e,approvalUpdateDataView:p,approvalRuleId:o,approverViewData:i,location:t})}function se(e){return B(e)==null}const J=F(function(e,s){const t=E(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",r=[],n={};for(const p of Object.values(e.contactState.contactById))p?.id!=null&&(r.push(p.id),n[p.id]=p.fullName);return{localData:t,approvalUpdateActionType:o,allVendorIds:r,vendorNamesById:n,editingRuleId:o==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:T(e).allApprovalRules}},function(e,s){const{navigate:t,approvalUpdateDataView:o,approverViewData:r,approvalRuleId:n}=s,p=o.remiSetupApproverViewUpdateData?.type,i=q(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const f=[];return c.forEach(m=>{const h=m.actorKind?.selectedOption,U=m.selectedRole?.selectedOption;let D=[];h==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:h==="specific_person"&&(D=(m.persons?.selectedUsers??[]).map(z=>({type:"user",subType:void 0,userId:z.userId,idType:"user",isImplicitActor:!1})));const x=m.action??"require_approval";f.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})}),f},l=a.amountCriteria,v=a.vendorCriteria,g=a.departmentCriteria,u={};if(l!=null&&l.comparator.selectedOption!=null){const c=l.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:l.min,max:c==="greater_than"?void 0:l.max}}const S=v?.selection.selectedOptions??[];S.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:S});const I=g?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:g?.operator.selectedOption??"is",departmentIds:I}),p==="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(w(c))}else{const c={approvalRuleId:n,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(c))}},onResetClick:()=>{e(A()),p==="approval_update"||i?t("../"):r.allApprovalRules.length===0&&r.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),p==="approval_update"||i?t("../"):r.allApprovalRules.length===0&&r.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(Q(a)),t(p==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}})(L);function oe(){const e=R(t=>M(t)),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?y.jsx(X,{}):y.jsx(H,{})}function X(){const e=_(),s=C(),t=O(),{approvalRuleId:o}=k(),r=N.getSignedInUser(),n=P(),p=R(l=>E(l)),i=R(l=>T(l)),[a,d]=b.useState(!1);if(b.useEffect(()=>{a||(d(!0),s(V(!0)))}),b.useEffect(()=>{i.fetchState==="Not-Started"&&e(o!=null?"../../":"../")},[i,o]),r==null)throw Error("Can't access address page without signing in...");return p.approversDetailsFetchStatus.fetchState=="Not-Started"||p.approversDetailsFetchStatus.fetchState==="In-Progress"?y.jsx($,{fetchState:p.approversDetailsFetchStatus.fetchState,style:{backgroundColor:n.colors.grey5}}):y.jsx(J,{navigate:e,approvalUpdateDataView:p,approvalRuleId:o,approverViewData:i,location:t},o??"new")}export{oe as R,se as i};
|