@zeniai/web-app-ui 5.3.70-qa → 5.3.71-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AccountMappingScreen-wr5e90XY.js +9 -0
- package/dist/assets/{ActualMatchingMatchDetailScreen-YIiKaKQ5.js → ActualMatchingMatchDetailScreen-6uqEn8-N.js} +1 -1
- package/dist/assets/AddressRoutes-CPs4flxe.js +1 -0
- package/dist/assets/{AddressScreen-i3P2ph6T.js → AddressScreen-gHefQKa8.js} +2 -2
- package/dist/assets/AiCfoScreen-CEAl0yNI.js +22 -0
- package/dist/assets/{AppDrawer-Dql_QZ37.js → AppDrawer-Bn-0lFBO.js} +2 -2
- package/dist/assets/{BillPayApprovalRoutes-BCU4pCRz.js → BillPayApprovalRoutes-BiJdZR8U.js} +1 -1
- package/dist/assets/{BillPayRoutes-7r9rU7sl.js → BillPayRoutes-DXyhm5fw.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-BmKmh97q.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-C4xeVeSy.js → CardsAiCfoScreen-DQsq0GP-.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BKebJlhL.js → ChargeCardRoutes-DfdupNV2.js} +6 -6
- package/dist/assets/{CompanyPassportScreen-BTV6sqcv.js → CompanyPassportScreen-BuvLd6cw.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-DjTBqhri.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-C8tuILJQ.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-Cy0Po35K.js +30 -0
- package/dist/assets/{DashboardRoutes-D-v8IdFM.js → DashboardRoutes-8__sl5wq.js} +3 -3
- package/dist/assets/{DefaultTenantHome-Ctr8hbVg.js → DefaultTenantHome-DxwX9QSa.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BhmYhgk9.js → DomesticWireDetailScreen-CttDo_kp.js} +4 -4
- package/dist/assets/{DrawerScreen-CiI0UwZ_.js → DrawerScreen-BxqxG0PQ.js} +1 -1
- package/dist/assets/EntityDetailRoutes-IK763X3v.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-gNYcLYcp.js → ExpenseAutomationRoutes-D4rJS8i6.js} +6 -6
- package/dist/assets/FeaturePreviewScreen-D9YZEx_i.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-D6zpdqh4.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-RMyde6sE.js → InboxNotificationsProvider-DKQDEkwT.js} +1 -1
- package/dist/assets/{InvoicingRoutes-OgCHCVmr.js → InvoicingRoutes-Dyk-gzDu.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-BwkRRCJu.js → MagicLinkRoutes-H-30UeRv.js} +20 -20
- package/dist/assets/MagicLinkSignInScreen-D1RkVzRJ.js +12 -0
- package/dist/assets/MobileAppDrawer-C8_grDao.js +1 -0
- package/dist/assets/NotFoundScreen-ElitTzP9.js +1 -0
- package/dist/assets/NotificationRoutes-BjEHHirs.js +1 -0
- package/dist/assets/OAuthConsentScreen-CNr6T2co.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-CYw1RIs5.js +1 -0
- package/dist/assets/{PaymentLinkScreen-CUXZafMx.js → PaymentLinkScreen-Swm1nWjC.js} +5 -5
- package/dist/assets/PeopleRoutes-Boqwg3eb.js +22 -0
- package/dist/assets/PerformanceRoutes-DeX11Kwz.js +1 -0
- package/dist/assets/{Preview-CHfSVeda.js → Preview-_9w2gB0C.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-2QWv8Ryp.js → QBOConnectionScreen-DKjMXVLM.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-CY-s3rH_.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Wh8YBERv.js → ReimbursementApprovalRuleDetailScreen-F2d751hQ.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Cn40tr84.js → ReimbursementRoutes-D0ji16gD.js} +7 -7
- package/dist/assets/{ReportsRoutes-DnLayxiF.js → ReportsRoutes-D6NIUgpA.js} +1 -1
- package/dist/assets/RewardsRoutes-C1N9iMC3.js +1 -0
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-BX94snOz.js +33 -0
- package/dist/assets/ScreenRoutes-CztUUstz.js +2 -0
- package/dist/assets/{SettingsRoutes-C253rFo8.js → SettingsRoutes-CMRE8iHr.js} +6 -6
- package/dist/assets/SetupPagesScreen-DYxGkmPi.js +29 -0
- package/dist/assets/SignInScreen-eurhSWfY.js +1 -0
- package/dist/assets/SignOutScreen-95rXjnV1.js +9 -0
- package/dist/assets/TaskListScreen-DGaBfbA4.js +9 -0
- package/dist/assets/TaskRoutes-CsEnl9bH.js +9 -0
- package/dist/assets/TransactionDetailRoutes-DUZoQUbB.js +1 -0
- package/dist/assets/{TransactionDetailScreen-ZbhuUtai.js → TransactionDetailScreen-C-tYoelm.js} +2 -2
- package/dist/assets/TransactionListRoutes-DnLBWn4g.js +1 -0
- package/dist/assets/{TreasuryRoutes-DULHfT4a.js → TreasuryRoutes-Dq4Gmpbt.js} +4 -4
- package/dist/assets/{VendorsRoutes-DDjSbdmH.js → VendorsRoutes-hz5k8whH.js} +13 -13
- package/dist/assets/WiseConfirmationScreen-_zEKzS0I.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-ZpQZTXfH.js → ZeniAccountRoutes-BA5NYp3W.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-BpCX0tSO.js +9 -0
- package/dist/assets/{accountMappingHelper-CDXfdGYB.js → accountMappingHelper-1el1nsHh.js} +1 -1
- package/dist/assets/{analytics-Bwul-sh2.js → analytics-B7hAl0cB.js} +1 -1
- package/dist/assets/{analyticsHelper-CJXbjLla.js → analyticsHelper-BfncnDpw.js} +1 -1
- package/dist/assets/{core-BTRpO5kD.js → core-CmooL1VE.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-gQrUmSgy.js → decodeURIComponentSafe-XuT8eSZ_.js} +1 -1
- package/dist/assets/{dnd-2ZjyQ0g9.js → dnd-DOVValOX.js} +1 -1
- package/dist/assets/{empty-Cb7Nu9Hh.js → empty-B6rABti8.js} +1 -1
- package/dist/assets/{empty-W69oI4tU.js → empty-DGUQebD_.js} +1 -1
- package/dist/assets/{emptyVideoElement-BykFTq6U.js → emptyVideoElement-ChZj1Ygj.js} +1 -1
- package/dist/assets/epic-CTQc1g-i.js +2 -0
- package/dist/assets/expenseAutomationHelper-C7H1WvS_.js +1 -0
- package/dist/assets/{getLocaleForTenant-COzbHLDP.js → getLocaleForTenant-BECA4-x0.js} +1 -1
- package/dist/assets/{index-EIrua76A.js → index-9VkJMIRG.js} +1 -1
- package/dist/assets/{index-CyWlZL1X.js → index-Bfs9-uOP.js} +2 -2
- package/dist/assets/{index-O5NQ6O4f.js → index-CcKNzvE0.js} +1 -1
- package/dist/assets/{index-BpHR89qw.js → index-DEI9m138.js} +1 -1
- package/dist/assets/{index-Ds59pPsN.js → index-DP7dTvCr.js} +1 -1
- package/dist/assets/{index-BNStHB6B.js → index-DfUoN49n.js} +1 -1
- package/dist/assets/{index-D-DXs1ug.js → index-LS_Pdivs.js} +16966 -16825
- package/dist/assets/{index-Dt8qJC5s.js → index-qN-QWXiP.js} +1 -1
- package/dist/assets/{lexical-B4Vx7iXM.js → lexical-BvHYLizv.js} +1 -1
- package/dist/assets/{liveblocks-CSh_vLcI.js → liveblocks-C6uJkYDp.js} +1 -1
- package/dist/assets/{lottie-CkDkDB9t.js → lottie-fAK2s9Hi.js} +1 -1
- package/dist/assets/{mui-DxxQrDXb.js → mui-rM9SB4se.js} +1 -1
- package/dist/assets/{pathToGoBack-CVTu70jh.js → pathToGoBack-hFb7er_y.js} +1 -1
- package/dist/assets/{pdf-B5u-xbSo.js → pdf-BB_582W7.js} +4 -4
- package/dist/assets/{pdf-lib-reHt5MEc.js → pdf-lib-CuUeF_UU.js} +1 -1
- package/dist/assets/{plaid-BETTZw7O.js → plaid-FTXMeicc.js} +1 -1
- package/dist/assets/{pusher-Ckps79Gu.js → pusher-BUX3wmLc.js} +1 -1
- package/dist/assets/{react-2QuTt-Yq.js → react-BDtCLFch.js} +1 -1
- package/dist/assets/{react-BwbSXuKk.js → react-BdMxK4It.js} +1 -1
- package/dist/assets/{react-D5AIOkBV.js → react-C_Xx03pb.js} +1 -1
- package/dist/assets/{react-BEHSpArB.js → react-CuH64ZSw.js} +1 -1
- package/dist/assets/{react-DAYatQOH.js → react-DKS-lUPm.js} +1 -1
- package/dist/assets/{react-CnCpDB3_.js → react-DSY5pTXE.js} +1 -1
- package/dist/assets/{recharts-TU-ixTpA.js → recharts-DKAwX7BS.js} +1 -1
- package/dist/assets/{routePaths-BpwABclb.js → routePaths-CMAA0FK7.js} +1 -1
- package/dist/assets/{sentry-BbRn6Rps.js → sentry-CcNJwOXe.js} +1 -1
- package/dist/assets/{stripSplatSuffix-CHEOIiL-.js → stripSplatSuffix-bj8J_4FB.js} +1 -1
- package/dist/assets/{url-COMcQU2v.js → url-CvKbggsF.js} +1 -1
- package/dist/assets/{url-DFeqMB02.js → url-DmEjP37W.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-CKR9mGuu.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BeQw4E92.js → useAiCfoDashboardSuggestedQuestionsChips-DK2RBwgq.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-B-1FcFXF.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-6cwlQnL1.js → useChargeCardPusherEvents-DdxKTDyN.js} +1 -1
- package/dist/assets/{useDeviceId-BNqfuCC6.js → useDeviceId-OT3_gug1.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-B_ss3xIm.js +1 -0
- package/dist/assets/{useInitialThreadRequest-CVcZLc8x.js → useInitialThreadRequest-D0Rb6DJ1.js} +1 -1
- package/dist/assets/useTaskManagerAccess-Dav7QmvM.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-QjRM_WrB.js → useTaskManagerPusherEvents-Rcj3c0Hv.js} +1 -1
- package/dist/assets/{utils-CG6WKZWt.js → utils-CKeki_tc.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-_2doqhuK.js → withTransactionSidePanel-D42v1kum.js} +4 -4
- package/dist/assets/{zeni-epic-state-GGdMfKwk.js → zeni-epic-state-GBqWdYww.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AccountMappingScreen-DqcX7eSX.js +0 -9
- package/dist/assets/AddressRoutes-BQwEhrxO.js +0 -1
- package/dist/assets/AiCfoScreen-BssUSHKh.js +0 -22
- package/dist/assets/BusinessVerificationPageScreen-BtYE51TA.js +0 -9
- package/dist/assets/ConnectionAuthScreen-CxytsIZE.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BihvMY31.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-DNk5fzPY.js +0 -30
- package/dist/assets/EntityDetailRoutes-DvFtuOf8.js +0 -1
- package/dist/assets/FeaturePreviewScreen-DiNAV9z-.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-DweVccIt.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-wnNTguw6.js +0 -12
- package/dist/assets/MobileAppDrawer-C0d1iVMA.js +0 -1
- package/dist/assets/NotFoundScreen-BEmDKBPw.js +0 -1
- package/dist/assets/NotificationRoutes-CI7va7e0.js +0 -1
- package/dist/assets/OAuthConsentScreen-DV8WsAVC.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-B1Gfn6ud.js +0 -1
- package/dist/assets/PeopleRoutes-Bn8rhJs3.js +0 -22
- package/dist/assets/PerformanceRoutes-CvtwCDup.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-EobIM3L1.js +0 -1
- package/dist/assets/RewardsRoutes-xdDqPM6d.js +0 -1
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CwSWMHf6.js +0 -33
- package/dist/assets/ScreenRoutes-B8Lww7Hb.js +0 -2
- package/dist/assets/SetupPagesScreen-K8aynBOv.js +0 -29
- package/dist/assets/SignInScreen-B673IWUl.js +0 -1
- package/dist/assets/SignOutScreen-BY00T1e6.js +0 -9
- package/dist/assets/TaskListScreen-DqA1P3PO.js +0 -9
- package/dist/assets/TaskRoutes-BXCCg41Z.js +0 -9
- package/dist/assets/TransactionDetailRoutes-fr5aBjbx.js +0 -1
- package/dist/assets/TransactionListRoutes-skEyucsa.js +0 -1
- package/dist/assets/WiseConfirmationScreen-BeEAkT2z.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-fYBBQyBB.js +0 -9
- package/dist/assets/epic-dVflju6K.js +0 -2
- package/dist/assets/expenseAutomationHelper-D83VUSa4.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-CCjKruLV.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-B9dKaXC2.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-CD4x3asD.js +0 -1
- package/dist/assets/useTaskManagerAccess-DkfJ_Uxt.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-C6uJkYDp.js";import{i as S,l as g,h as C,g as y,u as ee,t as ae,j as L,N as te,n as ne,o as p}from"./core-CmooL1VE.js";import{UA as k,UB as v,UC as T,JE as B,Jq as U,UD as D,UE as oe,UF as ie,Ju as se,gl as $,JB as le,Jy as de}from"./zeni-epic-state-GBqWdYww.js";import{a1 as x,M as d,a2 as re,n as j,Y as G,a3 as ce,a4 as me,a5 as pe,p as J,_ as ue,f as he,a6 as ge,c as xe,E as fe,h as be,a7 as we,a8 as Se,$ as ye,a9 as ke,aa as ve,ab as je,ac as $e}from"./index-LS_Pdivs.js";import{n as m}from"./mui-rM9SB4se.js";import f from"./NotFoundScreen-ElitTzP9.js";import{a as I}from"./sentry-CcNJwOXe.js";import"./recharts-DKAwX7BS.js";import"./analytics-B7hAl0cB.js";import"./plaid-FTXMeicc.js";import"./dnd-DOVValOX.js";import"./stripe-cKAAJElX.js";import"./lottie-fAK2s9Hi.js";import"./lexical-BvHYLizv.js";import"./pdf-BB_582W7.js";import"./utils-CKeki_tc.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]="62d06cd4-2587-4924-a520-5b4d389e5efb",e._sentryDebugIdIdentifier="sentry-dbid-62d06cd4-2587-4924-a520-5b4d389e5efb")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,8 +6,8 @@ import{j as a}from"./liveblocks-CSh_vLcI.js";import{i as S,l as g,h as C,g as y,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
box-shadow: ${e=>`0px 2px ${
|
|
10
|
-
`,Ce=g((function(e){const t=k(e),n=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(U(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(
|
|
9
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
+
`,Ce=g((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(U(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(T({data:l}))}}}))(re);function F(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Be=m.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
height: 100vh;
|
|
13
13
|
width: 100%;
|
|
@@ -15,8 +15,8 @@ import{j as a}from"./liveblocks-CSh_vLcI.js";import{i as S,l as g,h as C,g as y,
|
|
|
15
15
|
flex-direction: column;
|
|
16
16
|
align-items: center;
|
|
17
17
|
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
-
box-shadow: ${e=>`0px 2px ${
|
|
19
|
-
`,
|
|
18
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
+
`,De=g((function(e,t){const{isSubPage:n}=t;return{addressToEdit:D(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??Pe();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Ee(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}}))(ce);function Ae({isSubPage:e}){const t=C(),n=y(),o=x();return a.jsx(a.Fragment,{children:a.jsx(Be,{windowSize:o,children:a.jsx(De,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Ee=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%;
|
|
@@ -24,8 +24,8 @@ import{j as a}from"./liveblocks-CSh_vLcI.js";import{i as S,l as g,h as C,g as y,
|
|
|
24
24
|
flex-direction: column;
|
|
25
25
|
align-items: center;
|
|
26
26
|
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
-
box-shadow: ${e=>`0px 2px ${
|
|
28
|
-
`,Ne=g((function(e){const t=k(e),n=v(e),o=
|
|
27
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
+
`,Ne=g((function(e){const t=k(e),n=v(e),o=D(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(U(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(T({data:r}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),r=J(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:r}})}}}))(pe);function Le(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S();return o==null||i==null?a.jsx(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%;
|
|
@@ -33,40 +33,40 @@ import{j as a}from"./liveblocks-CSh_vLcI.js";import{i as S,l as g,h as C,g as y,
|
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
align-items: center;
|
|
35
35
|
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
box-shadow: ${e=>`0px 2px ${
|
|
37
|
-
`,Te=g((function(e){const t=k(e),n=v(e),o=
|
|
38
|
-
width: ${
|
|
39
|
-
height: ${
|
|
40
|
-
margin-bottom: ${
|
|
41
|
-
margin-top: ${
|
|
42
|
-
margin-left: ${
|
|
36
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
+
`,Te=g((function(e){const t=k(e),n=v(e),o=D(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(B(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:r}=s;e(ie({data:r}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),r=J(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:r}})}}}))(ge);function Ue(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(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)},Je=m(ke)`
|
|
38
|
+
width: ${d.sp4};
|
|
39
|
+
height: ${d.sp4};
|
|
40
|
+
margin-bottom: ${d.sp3};
|
|
41
|
+
margin-top: ${d.sp3};
|
|
42
|
+
margin-left: ${d.sp8};
|
|
43
43
|
cursor: pointer;
|
|
44
44
|
position: absolute;
|
|
45
45
|
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,
|
|
46
|
+
`,Me=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;
|
|
57
57
|
width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
|
|
58
58
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
-
box-shadow: ${e=>`0px 2px ${
|
|
60
|
-
padding-top: ${e=>e.windowSize!=="small"?
|
|
59
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
+
padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
|
|
61
61
|
`,Ve=m.div`
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
64
64
|
align-items: center;
|
|
65
65
|
justify-content: center;
|
|
66
|
-
padding: ${e=>e.windowSize==="small"?
|
|
66
|
+
padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.sp8}`};
|
|
67
67
|
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
68
|
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
69
|
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
70
|
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
71
|
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
-
`,_e=g((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(),
|
|
72
|
+
`,_e=g((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(),r=s.get("token"),M=n.pathname.includes("address"),b=x(),H=xe(),A=fe(),w=be(),V=()=>{H.toggle()},_=L((u=>k(u))),K=L((u=>v(u))),{authParams:W,fetchState:c,billAttachment:O,billFetchState:P,companyName:Y,currencySymbol:q,amount:Q}=_,{tenantId:E,userId:z,sessionId:N}=W,{fetchState:R,internationalBankAccountCreateStatus:X}=K;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{w&&c==="Not-Started"&&i!=null&&o!=null&&r!=null&&t(le(i,o,r))}),[w,c,i,o,r,t]),I.useEffect((()=>{w&&c==="Completed"&&($(z,N,E),l!=null&&t(de(l)))}),[c,w,z,N,E,l,t]),c==="Error"?a.jsx(f,{}):R==="Completed"||X.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",Y,l??"",Ke(n.pathname),q,Q))(u)}),a.jsxs(Me,{windowSize:b,children:[b!=="small"?a.jsx(Je,{onClick:V}):null,a.jsx(Ve,{windowSize:b,isAddressPage:M,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(_e,{file:O,type:"bill"})}),a.jsx(He,{windowSize:b,children:e})]})]})}const Ke=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function We(){return a.jsx($e,{})}function ra(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(We,{})}),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(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Le,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ue,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{ra as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-C6uJkYDp.js";import{a as g}from"./sentry-CcNJwOXe.js";import{u as O,g as w,h as _,t as M,j as l,N as U}from"./core-CmooL1VE.js";import{z as r,E as P,G as V,S as A,n as N,T as W,Z as $,$ as G,W as R}from"./index-LS_Pdivs.js";import{fI as X,U3 as Z,Uw as q,Un as B,gl as H,gn as J,Us as K,gX as Q,dk as Y,Ux as ee,Uy as te}from"./zeni-epic-state-GBqWdYww.js";import{n as ne}from"./mui-rM9SB4se.js";import{u as se}from"./useDeviceId-OT3_gug1.js";import{f as ae}from"./analyticsHelper-BfncnDpw.js";import{t as ie}from"./getLocaleForTenant-BECA4-x0.js";import"./recharts-DKAwX7BS.js";import"./analytics-B7hAl0cB.js";import"./plaid-FTXMeicc.js";import"./dnd-DOVValOX.js";import"./stripe-cKAAJElX.js";import"./lottie-fAK2s9Hi.js";import"./lexical-BvHYLizv.js";import"./pdf-BB_582W7.js";import"./utils-CKeki_tc.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]="53db3ba1-7a01-440c-ae6b-b26ff29f8458",t._sentryDebugIdIdentifier="sentry-dbid-53db3ba1-7a01-440c-ae6b-b26ff29f8458")}catch{}})();const T=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Te(){const t=O(),a=w(),m=_(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:z}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>X(e))),b=l((e=>Z(e))),D=r.getSignedInUser(),v=P().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,f)))}),[n,p,t,i,f,s?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(b.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Q().then((()=>{const e=R();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(W.Event.loginSuccess,"email",Y(o.productSettings))}),2e3))}),[I,S,y,s,o,b,v,a.state,t]);const E=g.useCallback((()=>{m("/signin/auth")}),[m]),j=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),F=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($,{phoneNumber:x,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:E});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||D!=null){const e=a.state?.origin??"/";return u.jsx(U,{to:e,state:{...a.state,origin:""}})}if(!T(n,p)||f==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(U,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(G,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 9999;
|
|
11
|
+
background-color: ${t=>t.theme.colors.background};
|
|
12
|
+
`;export{Te as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as _}from"./liveblocks-C6uJkYDp.js";import{a as f}from"./sentry-CcNJwOXe.js";import{u as te,j as t,i as $e,g as Ge,h as Ue,q as F}from"./core-CmooL1VE.js";import{fI as ne,U4 as Me,U5 as se,gc as Ne,fH as xe,Ue as Pe,U7 as Re,U8 as Ve,q2 as je,gp as Le,Ub as b,Ug as Oe,Uh as Q,gq as qe,Ui as Ze,Eh as ze,h4 as He,cW as We,Uj as Ye,gb as Je,gr as Ke}from"./zeni-epic-state-GBqWdYww.js";import{w as Qe,i as Xe,c as ea,_ as aa,d as ta,h as na,u as sa,f as c,j as oa,g as ia,z as ra,e as da,q as ca,r as la,y as ua,s as fa,v as X,L as ma,I as ha,J as ba,p as S,n as ee,B as pa,N as ae,D as ga,F as Sa}from"./index-LS_Pdivs.js";import{D as Ea}from"./mui-rM9SB4se.js";import{u as ka}from"./InboxNotificationsProvider-DKQDEkwT.js";import{u as Ca}from"./useTaskManagerAccess-Dav7QmvM.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="a58e4cff-e434-4ffc-a20c-66075acb21c0",l._sentryDebugIdIdentifier="sentry-dbid-a58e4cff-e434-4ffc-a20c-66075acb21c0")}catch{}})();const Ta=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),E=ea(),n=Ue(),B=Ne(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:k}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>xe(e))),{status:ie}=t(Pe),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,U]=f.useState(void 0),v=F("/:tenantEmailDomain/dashboard")!==null,M=F("/:tenantEmailDomain/reports")!==null,m=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:N}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,N),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),x=t((e=>Re(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),A=t((e=>Ve(e)));f.useEffect((()=>{C&&T&&!m&&A.fetchState==="Not-Started"&&r(je(!0))}),[C,T,A.fetchState,m]);const D=t((e=>e.tenantState)),fe=t((e=>D.fetchState==="Completed"?Le(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:me}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),P=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),Ee=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",ke=t((e=>b(e).totalUnreadCount)),Ce=t((e=>b(e).reducedFetchCountState)),R=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),V=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),j=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:L,isLoading:O,isFetchingMore:q,hasFetchedAll:Z,fetchMore:Te}=ka();f.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),f.useEffect((()=>{if(O===!1&&q===!1&&Z===!0)if(o?.companyId!=null&&L!=null){const e=`dashboard_${o.companyId}`;U(L.filter((u=>u.roomId===e&&u.readAt==null)).length)}else U(0)}),[O,q,Z]),f.useEffect((()=>{C&&k&&!m&&j.fetchState==="Not-Started"&&B.tenantId!=null&&r(Oe("task_manager","dashboard"))}),[C,k,m,j.fetchState,B.tenantId,r]),f.useEffect((()=>{m||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[m,I.fetchState,r]),f.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(Q({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:ke},z=s!=null?ra.getSignedInUserTenant(s):null,H=t((e=>z?.tenantId!=null?qe(e,z.tenantId):void 0)),h=[];me===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&h.push("rewards_card"),P===!1&&h.push("expense_automation_card");const W=t((e=>Ze(e,h).fetchState)),Y=t((e=>ze(e).fetchState)),ye=v&&(W==="Completed"||W==="Error")||M&&(Y==="Completed"||Y==="Error")||!v&&!M?void 0:"disabled",we=f.useMemo((()=>He(o.userRole)),[o.userRole]),ve=We(we),Ae=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&x.fetchState==="Completed"&&Ye(x.notificationSettings,p.userEmail,N,o,k),J=da(),Fe=J&&ca(a);return _.jsx(Ea,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:_.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?fe:H!=null?[H]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:fa(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:ve,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:Ee,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:P,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ae,rewardsPlan:A.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=R===0&&V>0?"notifications/comments":"notifications/tasks";X(a)&&(e=R===0&&V>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,_e=ae(K)&&K!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),_e&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Be=ga(e.type);Sa(e.type)?(G!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Be}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(ma.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{E.toggle()},isAiCfo:Fe,aiCfoView:$,isOnDashboard:v,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:k,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Ba=l=>{const i=te(),s=t((E=>ne(E))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(E,n)=>{Xe(n)&&Me(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return _.jsx(Ta,{...l,...a})};export{Ba as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-C6uJkYDp.js";import{h as r,l as i}from"./core-CmooL1VE.js";import{am as n}from"./index-LS_Pdivs.js";import"./mui-rM9SB4se.js";import"./sentry-CcNJwOXe.js";import"./zeni-epic-state-GBqWdYww.js";import"./recharts-DKAwX7BS.js";import"./analytics-B7hAl0cB.js";import"./plaid-FTXMeicc.js";import"./dnd-DOVValOX.js";import"./stripe-cKAAJElX.js";import"./lottie-fAK2s9Hi.js";import"./lexical-BvHYLizv.js";import"./pdf-BB_582W7.js";import"./utils-CKeki_tc.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]="f2f6ef04-8019-4dfe-8bec-98d5efe59039",o._sentryDebugIdIdentifier="sentry-dbid-f2f6ef04-8019-4dfe-8bec-98d5efe59039")}catch{}})();const f=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(f,{navigate:o})}export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as mt,b as lt,o as ft,j as N}from"./liveblocks-C6uJkYDp.js";import ut from"./NotFoundScreen-ElitTzP9.js";import{a as k}from"./sentry-CcNJwOXe.js";import{h as ht,g as pt,i as kt,u as gt,j as S,l as St,n as bt,o as X}from"./core-CmooL1VE.js";import{cB as It,U7 as z,fI as J,h4 as Ct,Ub as b,a15 as Q,Uh as m,U5 as y,Ax as F,Ge as Tt,a16 as At,U4 as yt,Uj as Et,AC as _t,a17 as j,br as $,gk as w,AG as Y,a18 as Nt,cN as Bt,cG as xt}from"./zeni-epic-state-GBqWdYww.js";import{aq as wt,d as Ut,_ as Gt,f as vt,as as Dt,dK as Rt,p as B,dL as Pt,w as Mt,dM as jt,i as $t,a4 as Ft}from"./index-LS_Pdivs.js";import"./mui-rM9SB4se.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-B-1FcFXF.js";import{u as qt}from"./useTaskManagerAccess-Dav7QmvM.js";import"./recharts-DKAwX7BS.js";import"./analytics-B7hAl0cB.js";import"./plaid-FTXMeicc.js";import"./dnd-DOVValOX.js";import"./stripe-cKAAJElX.js";import"./lottie-fAK2s9Hi.js";import"./lexical-BvHYLizv.js";import"./pdf-BB_582W7.js";import"./utils-CKeki_tc.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]="7693ac01-0255-45cb-9992-f94a650d5572",t._sentryDebugIdIdentifier="sentry-dbid-7693ac01-0255-45cb-9992-f94a650d5572")}catch{}})();const Lt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),Wt=St((function(t,l){const n=z(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=J(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:G}=l;return{onNotificationClick:(e,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,C=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:C,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,C=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:C,message:"triggerBackClick"}})}d==="unread"&&t(Y("task_manager","read",[e],!1))},onCommentNotificationClick:(e,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(e),t(j([e],$())));let i=`/${h}/${r[1]}`;const C=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!xt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:C,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(e,s)=>{t(y(e,s))},onUpdateNotificationTabState:(e,s)=>{t(m(e,s))},onUpdateNotificationViewCurrentTabAndSubTab:(e,s)=>{t(Q(e,s));const d=`../${e}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:e=>{t(Nt(e))},onFetchMoreNotifications:(e,s)=>{if(e==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(F("task_manager","dashboard",d))}else G?.()},onUpdateNotificationStatus:(e,s,d,r)=>{e==="tasks"?t(Y("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t(j([i],$())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:e=>{e==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Lt(o,I).then((()=>{t(j(o,$())),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((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const e=Ft(n.state?.pathnameStackToGoBack),s=e.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:e.newStack}})},onSettingsClick:()=>{const e=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:e}})}}}))(Mt(jt)),Ht=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=wt(),c=It(h??""),o=gt(),f=Ut(),[I,G]=k.useState(!1),e=S((a=>z(a))),s=S((a=>J(a))),{useFeatureGate:d}=Gt(),{isFeatureEnabled:r}=d(vt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:C}=Vt({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const Z=Ct(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=S((a=>b(a).notificationDetailsByTab.tasks.fetchState)),q=S((a=>b(a).currentTab)),v=S((a=>b(a).currentSubTab)),tt=S((a=>b(a).notificationDetailsByTab.comments.fetchCountState)),D=S((a=>b(a).notificationDetailsByTab.comments.fetchState)),at=S((a=>b(a).notificationDetailsByTab.comments.uiState.unreadCount)),et=S((a=>b(a).allExternalNotifications)).filter((a=>a.inboxNotification.readAt==null)).map((a=>a.inboxNotification.id)),st=Rt().allUsers,{inboxNotifications:x,isLoading:E,hasFetchedAll:T,isFetchingMore:R,fetchMore:ot}=mt(),{threads:L,isLoading:W,fetchMore:H,isFetchingMore:K,hasFetchedAll:O}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(q!==c&&c!=null&&o(Q(c)),c==null){const a=`../${q}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(a,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&T===!0&&s?.companyId!=null&&x!=null){const a=`dashboard_${s.companyId}`,p=x.filter((A=>A.roomId===a&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(y({unreadCount:p},"comments"))}}),[E,T]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(F("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const a=setTimeout((()=>ot?.()),0);return()=>clearTimeout(a)}));const P=E||R===!0||T!==!0||E||R===!0||T!==!0;k.useEffect((()=>{P&&D!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||D!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,D]),k.useEffect((()=>{o(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{e.fetchState!=="In-Progress"&&e.fetchState!=="Completed"&&I===!1&&(G(!0),o(Tt()))}),[e.fetchState]),k.useEffect((()=>{if(E===!1&&W===!1&&x!=null&&L!=null){const a=`dashboard_${s.companyId}`,p=x.filter((u=>u.roomId===a)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=L.find((dt=>{return dt.id===((U=u).kind==="thread"?U.threadId:"subjectId"in U?U.subjectId:void 0);var U}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(K||O===!0||H==null||H(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,R,K,T,O,W,x?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(a,p)=>{if($t(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];v==="all"?_.push("read","unread"):v!=="mentions"&&_.push(v),o(F("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=qt(f);return N.jsx(Wt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:i,onAskAiCfoClick:C,...nt})};function ma(){return N.jsxs(bt,{children:[N.jsx(X,{path:"/:selectedTab",element:N.jsx(Ht,{})}),N.jsx(X,{path:"*",element:N.jsx(ut,{})})]})}export{ma as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as m}from"./liveblocks-C6uJkYDp.js";import{a as r}from"./sentry-CcNJwOXe.js";import{u as A,g as j,j as o,N as C}from"./core-CmooL1VE.js";import{UK as M,fI as P,gp as x,UL as z,UM as D,UN as L,UO as N,pV as R,Tp as k}from"./zeni-epic-state-GBqWdYww.js";import{z as h,ah as I}from"./index-LS_Pdivs.js";import"./mui-rM9SB4se.js";import"./recharts-DKAwX7BS.js";import"./analytics-B7hAl0cB.js";import"./plaid-FTXMeicc.js";import"./dnd-DOVValOX.js";import"./stripe-cKAAJElX.js";import"./lottie-fAK2s9Hi.js";import"./lexical-BvHYLizv.js";import"./pdf-BB_582W7.js";import"./utils-CKeki_tc.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]="c0c0c2dd-06ea-49f7-89ff-99c0b9b0a35f",n._sentryDebugIdIdentifier="sentry-dbid-c0c0c2dd-06ea-49f7-89ff-99c0b9b0a35f")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo((()=>M(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),b=o(D),c=o(L),[U,v]=r.useState(null),[S,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(N())}),[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(R(a.userId,a.zeniSessionId??void 0))))}),[f,a,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((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),u=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:u,onSelectTenant:v,approveError:S??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(k(a.userId,a.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{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-C6uJkYDp.js";import{h as G,u as W,g as z,i as H,j as d,l as J,n as K,o as C}from"./core-CmooL1VE.js";import{fI as v,Ai as R,vb as Q,VC as M,v6 as T,bq as X,c0 as Z,v7 as ee,VD as ae,Vk as S,ek as te,E6 as se,VE as oe,Eu as re,e0 as ne,d$ as ce}from"./zeni-epic-state-GBqWdYww.js";import{ai as ie,z as le,aq as de,as as fe,P as me,a8 as pe,n as w,aD as ue,p as he,_ as Fe,f as ge}from"./index-LS_Pdivs.js";import"./mui-rM9SB4se.js";import Ie from"./NotFoundScreen-ElitTzP9.js";import{F as be}from"./FeaturePreviewScreen-D9YZEx_i.js";import{a as F}from"./sentry-CcNJwOXe.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-B-1FcFXF.js";import{u as Se}from"./useInitialThreadRequest-D0Rb6DJ1.js";import{t as Te}from"./routePaths-CMAA0FK7.js";import{M as ye}from"./MobileAppDrawer-C8_grDao.js";import"./recharts-DKAwX7BS.js";import"./analytics-B7hAl0cB.js";import"./plaid-FTXMeicc.js";import"./dnd-DOVValOX.js";import"./stripe-cKAAJElX.js";import"./lottie-fAK2s9Hi.js";import"./lexical-BvHYLizv.js";import"./pdf-BB_582W7.js";import"./utils-CKeki_tc.js";import"./InboxNotificationsProvider-DKQDEkwT.js";import"./useTaskManagerAccess-Dav7QmvM.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]="159edb35-db07-4dc9-a2cf-e0f90f46f506",s._sentryDebugIdIdentifier="sentry-dbid-159edb35-db07-4dc9-a2cf-e0f90f46f506")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=J((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(M(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),f=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:f,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=G(),a=W(),o=z(),{forecastId:r,tenantEmailDomain:c}=H(),[p,u]=F.useState(!1),[f,A]=F.useState(!1),g=le.getSignedInUser(),D=d((t=>v(t))),_=D.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),k=d((t=>t.profitAndLossState)),x=d((t=>t.reportUIOptionsState.selectedForecast)),P=t=>k.pandLByForecastID[t]!=null&&ee(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();fe({isDataReady:l});const{isAiCfoAccessEnabled:q,onAskAiCfoClick:V}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&I)u(!0),l||a(Q());else if(l&&!f){A(!0);const t=((m,L,O)=>L!=null?m.forecasts.findIndex((b=>b.id===L)):O!=null?m.forecasts.findIndex((b=>b.id===O)):m.forecasts.length>0?0:-1)(i,r,x?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(a(M(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!P(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,f,A,R,T,I]);const E=me(),$=E?.loggedInUserRole!=null&&X(E.loggedInUserRole),B=Se(D?.companyId,{clearParams:l&&f}),[N,Y]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const j=t=>{Y(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:w,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:N,handleDrawerToggle:j}),n.jsx(Ae,{firstMonthOfFY:_,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:P,meetingUrl:Z(h.toString()),hasTransactionAccess:$,isAiCfoAccessEnabled:q,onAskAiCfoClick:V,initialOpenThreadRequest:B,onClickMenuIcon:()=>{j(!0)}})]})}function He(){const s=d((c=>v(c))),{useFeatureGate:e}=Fe(),{isFeatureEnabled:a}=e(ge.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(K,{children:[n.jsx(C,{path:"/",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{He as default};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-C6uJkYDp.js";import{a as p}from"./sentry-CcNJwOXe.js";import{K as d,M as a,a9 as m,ad as f,ae as h}from"./index-LS_Pdivs.js";import"./mui-rM9SB4se.js";import{i as y}from"./core-CmooL1VE.js";import"./zeni-epic-state-GBqWdYww.js";import"./recharts-DKAwX7BS.js";import"./analytics-B7hAl0cB.js";import"./plaid-FTXMeicc.js";import"./dnd-DOVValOX.js";import"./stripe-cKAAJElX.js";import"./lottie-fAK2s9Hi.js";import"./lexical-BvHYLizv.js";import"./pdf-BB_582W7.js";import"./utils-CKeki_tc.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]="494643e4-d3d3-47b9-adb9-bda555527506",e._sentryDebugIdIdentifier="sentry-dbid-494643e4-d3d3-47b9-adb9-bda555527506")}catch{}})();const g=d("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
5
5
|
min-height: 100vh;
|
|
6
6
|
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,
|
|
7
|
+
`,b=d("header")`
|
|
8
8
|
flex-shrink: 0;
|
|
9
9
|
padding: ${a.sp3} ${a.sp4};
|
|
10
|
-
`,k=
|
|
10
|
+
`,k=d(m)`
|
|
11
11
|
width: ${a.sp4};
|
|
12
12
|
height: ${a.sp4};
|
|
13
13
|
color: ${e=>e.theme.colors.brandColorJade};
|
|
14
|
-
`,x=
|
|
14
|
+
`,x=d("main")`
|
|
15
15
|
display: flex;
|
|
16
16
|
flex: 1 1 auto;
|
|
17
17
|
flex-direction: column;
|
|
18
18
|
align-items: center;
|
|
19
19
|
justify-content: center;
|
|
20
20
|
padding: ${a.sp4};
|
|
21
|
-
`;function j({children:e}){return r.jsxs(
|
|
21
|
+
`;function j({children:e}){return r.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(b,{children:r.jsx(k,{"aria-label":"Zeni",role:"img"})}),r.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,u){const l=await fetch(`${o}${n}`,{body:JSON.stringify(u),headers:{"Content-Type":"application/json"},method:"POST"}),c=await l.json();if(!l.ok)throw new w(c.status?.message??`Request failed (${l.status}).`,l.status);return c.data}return{checkoutSession:()=>i("/portal/payment-link/checkout-session",s),plaidLinkToken:()=>i("/portal/payment-link/plaid-link-token",s),requestAccess:()=>i("/portal/payment-link/request-access",s),savePaymentMethod:n=>i("/portal/payment-link/payment-methods",{...s,...n}),session:()=>i("/portal/payment-link/session",s),setupIntent:()=>i("/portal/payment-link/setup-intent",s)}}function B(){const{namespace:e="",token:t=""}=y();p.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]);const o=p.useMemo((()=>$(e,t)),[e,t]);return r.jsx(j,{children:r.jsx(f,{portal:o})})}export{B as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-C6uJkYDp.js";import{Vy as re,fI as N,m2 as _,e0 as Y,d$ as le,Sp as J,UX as de,D1 as Ee,Vz as X,CS as je,Db as Le,D5 as ce,CW as pe,D9 as Te,D6 as ve,VA as ue,sw as Ae,g9 as Ve,gG as Fe,VB as G,C_ as me,CZ as ge,De as Re,c9 as Oe}from"./zeni-epic-state-GBqWdYww.js";import{a1 as fe,_ as Q,f as H,z as W,j as Ce,U as he,af as ye,az as be,aA as Be,ab as Se,M as R,ag as we,G as K,aB as Ze,aq as Ue,as as $e,a8 as ze,n as De,T as Ge,p as He,aC as _e,P as We}from"./index-LS_Pdivs.js";import{D as xe,n as M,S as Ie}from"./mui-rM9SB4se.js";import ae from"./NotFoundScreen-ElitTzP9.js";import{a as d}from"./sentry-CcNJwOXe.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Xe,n as se,o as z}from"./core-CmooL1VE.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-B-1FcFXF.js";import{M as Ye}from"./MobileAppDrawer-C8_grDao.js";import"./recharts-DKAwX7BS.js";import"./analytics-B7hAl0cB.js";import"./plaid-FTXMeicc.js";import"./dnd-DOVValOX.js";import"./stripe-cKAAJElX.js";import"./lottie-fAK2s9Hi.js";import"./lexical-BvHYLizv.js";import"./pdf-BB_582W7.js";import"./utils-CKeki_tc.js";import"./InboxNotificationsProvider-DKQDEkwT.js";import"./useTaskManagerAccess-Dav7QmvM.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]="715059dc-00dc-4fd1-9a28-1eabebf0a6e4",e._sentryDebugIdIdentifier="sentry-dbid-715059dc-00dc-4fd1-9a28-1eabebf0a6e4")}catch{}})();const Je={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,B]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=Ke(),r=g((l=>re(l))),p=g((l=>N(l))),P=g((l=>_(l))),{useFeatureGate:x}=Q(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),E=Y(I,p),T=le(p),v=J(p),Z=de(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,D=!E&&P&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(X()),b()},A=()=>{O===!0?S(!0):h()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=Ce(p,j,I),{isCardsHidden:V}=he(p?.tenantId),y=!L||V,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:P,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:T,onResetClick:h,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:A,isLoading:D||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{D===!1&&w!=null&&m(Ee(w))}),[D,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Pe,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Be,{...s})]})})},ea=M(Ie)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,ke=M(we.H6Regular)`
|
|
6
|
+
margin-top: ${R.sp7};
|
|
7
|
+
padding-left: ${R.sp8};
|
|
8
|
+
padding-right: ${R.sp8};
|
|
9
|
+
color: ${e=>e.theme.colors.primary};
|
|
10
|
+
word-break: break-word;
|
|
11
|
+
`,Pe=M(we.LargeRegularSp)`
|
|
12
|
+
color: ${e=>e.theme.colors.hero};
|
|
13
|
+
padding-left: ${R.sp8};
|
|
14
|
+
padding-right: ${R.sp8};
|
|
15
|
+
margin-bottom: 30px;
|
|
16
|
+
margin-top: ${R.sp4};
|
|
17
|
+
white-space: pre-line;
|
|
18
|
+
`,aa={overlayWidth:new Se(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,B]=d.useState(!1),[k,S]=d.useState(!1),w=g((o=>re(o))),r=g((o=>N(o))),p=g((o=>_(o))),{useFeatureGate:P}=Q(),{isFeatureEnabled:x}=P(H.isDebitCardFeatureEnabled),I=Y(x,r),E=le(r),T=J(r),v=de(r),Z=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const D=()=>{b(),m(X())},h=()=>{O===!0?S(!0):D()},A={onOkClick:()=>{S(!1),D()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=P(H.isChargeCardFeatureEnabled),L=Ce(r,j,x),{isCardsHidden:V}=he(r?.tenantId),y=!L||V,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(ce({peopleLocalData:o})),B(!0)},onResetClick:D,onSaveClick:()=>{m(f==="zeni_only"?Te(e):ve())},onCloseClick:h,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:Z===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:E,isLoading:U};return d.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(X()))}),[w.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:h,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Pe,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:A}):null,a.jsx(Ze,{...s})]})})},ta=M(Ie)`
|
|
19
|
+
display: flex;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
`,na=Xe((function(e,t){const c=ue(e),n=W.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:De}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(G({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(G({searchText:i}))}}}}))(_e);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=Me(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Ue(),b=W.getSignedInUser(),C=g((s=>N(s))),{useFeatureGate:m}=Q(),{isFeatureEnabled:O}=m(H.isDebitCardFeatureEnabled),B=g((s=>_(s))),k=!Y(O,C)&&B,S=J(C),w=C?.tenantId,{tenantEmailDomain:r}=C,[p,P]=d.useState(!1),[x,I]=d.useState(!1),[E,T]=d.useState(!1),[v,Z]=d.useState("off"),[U,D]=d.useState(!1),h=s=>{D(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=Ne({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ae(s.classState,s.classListState))),L=g((s=>Ve(s.userState,s.userRoleState,s.userListViewState,"manager"))),V=g((s=>Fe(s))),y=C?.companyId;d.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),Z(u.uiState.mode),P(!0),n(me()))}),[p,b,w,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),T(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:De,onLoad:s=>s.trackPageLoaded(Ge.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:V,classListView:j,companyId:y,mode:u.uiState.mode}):null,E===!0?a.jsx(Qe,{closeDrawerHandler:F,isEditPeopleDrawerOpen:E,managersListView:L,companyPassportView:V,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ye,{isAppContentDrawerOpen:U,handleDrawerToggle:h}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:C.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(G({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=He(f.state?.pathnameStackToGoBack,f.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=We();return Oe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-C6uJkYDp.js";import E from"./NotFoundScreen-ElitTzP9.js";import{a as r}from"./sentry-CcNJwOXe.js";import{h as _,g as v,j as p,i as M,u as U,N as O,l as P,n as z,o as b}from"./core-CmooL1VE.js";import{fI as N,a19 as h,bo as B,bn as F,iO as V,gk as $}from"./zeni-epic-state-GBqWdYww.js";import{c as q,z as I,as as G,dN as H}from"./index-LS_Pdivs.js";import"./mui-rM9SB4se.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-B-1FcFXF.js";import{M as K}from"./MobileAppDrawer-C8_grDao.js";import"./recharts-DKAwX7BS.js";import"./analytics-B7hAl0cB.js";import"./plaid-FTXMeicc.js";import"./dnd-DOVValOX.js";import"./stripe-cKAAJElX.js";import"./lottie-fAK2s9Hi.js";import"./lexical-BvHYLizv.js";import"./pdf-BB_582W7.js";import"./utils-CKeki_tc.js";import"./InboxNotificationsProvider-DKQDEkwT.js";import"./useTaskManagerAccess-Dav7QmvM.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]="2705c20b-da9c-45f8-b40f-7f3b5286e550",e._sentryDebugIdIdentifier="sentry-dbid-2705c20b-da9c-45f8-b40f-7f3b5286e550")}catch{}})();const L=P((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)}}}))(H),Q=()=>{const e=_(),t=v(),c=q(),o=p((a=>N(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:m}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=F(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${m}/dashboard`,replace:!0})};function be(){return s.jsxs(z,{children:[s.jsx(b,{path:"*",element:s.jsx(Q,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as a}from"./sentry-
|
|
1
|
+
import{a as h,R as a}from"./sentry-CcNJwOXe.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as _l}from"./liveblocks-
|
|
1
|
+
import{j as _l}from"./liveblocks-C6uJkYDp.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-CcNJwOXe.js";import{L as ge,c0 as xc,fI as kc,U3 as Tc,UV as jl,c9 as xl}from"./zeni-epic-state-GBqWdYww.js";import{a as pe,b as kl,c as Tl,d as Al,e as un,f as Rl,g as Pl,h as Il,i as Ve,j as Ac,k as ot,l as xt,m as Ll,o as ct,p as Nl}from"./utils-CKeki_tc.js";import{r as cn}from"./empty-B6rABti8.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-CuUeF_UU.js";import{a as Ye,r as Fl}from"./index-9VkJMIRG.js";import{r as Ul}from"./index-DP7dTvCr.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-CmooL1VE.js";import{u as Zl,z as Rc,L as Hl,ak as Vl,al as Yl,Y as Wl,I as Kl}from"./index-LS_Pdivs.js";import"./mui-rM9SB4se.js";import{d as It}from"./decodeURIComponentSafe-XuT8eSZ_.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]="69fca273-6099-4131-ae78-54b16d05e660",e._sentryDebugIdIdentifier="sentry-dbid-69fca273-6099-4131-ae78-54b16d05e660")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
|
|
2
2
|
`),I=S(E).split(`
|
|
3
3
|
`),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-C6uJkYDp.js";import Z from"./NotFoundScreen-ElitTzP9.js";import{a as p}from"./sentry-CcNJwOXe.js";import{h as C,g as N,u as V,j as u,N as D,l as k,n as z,o as g}from"./core-CmooL1VE.js";import{fI as E,Zf as w,Zw as h,NQ as U,NM as L,NP as f,NF as B,ZV as T,NJ as F,NS as J}from"./zeni-epic-state-GBqWdYww.js";import{z as $,w as O,ca as K,v as W,bT as M,cb as P}from"./index-LS_Pdivs.js";import"./mui-rM9SB4se.js";import{u as Q,R as x}from"./ReimbursementApprovalRuleDetailScreen-F2d751hQ.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]="af8b5e09-34d2-42eb-89fb-e9b3eaa027fa",e._sentryDebugIdIdentifier="sentry-dbid-af8b5e09-34d2-42eb-89fb-e9b3eaa027fa")}catch{}})();const j="reimbursement-approval-rule-update",q=k((function(e){return{approvalView:w(e),remiSetupApproverViewUpdateData:h(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(T(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(O(K)),G=({isLoading:e})=>{const s=C(),n=N(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>w(o))),b=u((o=>h(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",H=k((function(e){const s=w(e),n=h(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(T(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(J(t,!0))}}}))(O(P)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=M(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(G,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=N(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>w(i)));Q();const y=u((i=>h(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(R(!0),a(F(!1,!0)))}),[v,b,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(A)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(H,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return r.jsxs(z,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(Z,{})})]})}export{le as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-C6uJkYDp.js";import{a as f}from"./sentry-CcNJwOXe.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-CmooL1VE.js";import{mu as Z,Zw as w,Zf as x,NI as k,NV as B,NQ as A,NR as E,Zx as j,fI as z,NP as K}from"./zeni-epic-state-GBqWdYww.js";import{z as P,E as F,a7 as $,c1 as Q,v as q,bT as W,c2 as G}from"./index-LS_Pdivs.js";import"./mui-rM9SB4se.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]="0d0114b9-b179-4dfa-95c2-55b61bd6df61",e._sentryDebugIdIdentifier="sentry-dbid-0d0114b9-b179-4dfa-95c2-55b61bd6df61")}catch{}})();function H(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(Z({})))}),[p,t,e])}const J=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=v=>{const S=[];return v.forEach((d=>{const I=d.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),R=d.actors.selectedNonUsers.map((m=>{const y=(b=m.value,j(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(R);S.push({action:d.stepType.selectedOption,actors:c,operator:c.length>1?d.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(Q);function M(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=P.getSignedInUser(),i=F(),r=g((n=>w(n))),l=g((n=>x(n))),[a,u]=f.useState(!1);if(f.useEffect((()=>{a||(u(!0),s(k(!0)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return j(e)==null}const X=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:i,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=c=>{const m=[];return c.forEach((y=>{const b=y.actorKind?.selectedOption,L=y.selectedRole?.selectedNonUsers??[];let D=[];b==="role"?D=L.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const C=y.action??"require_approval";m.push({action:C,actors:D,operator:D.length>1?C==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,d={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;d.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(d.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=S?.selection.selectedOptions??[];if(R.length>0&&(d.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(K(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(G);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(M,{})}function Y(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=P.getSignedInUser(),i=F(),r=g((n=>w(n))),l=g((n=>x(n))),[a,u]=f.useState(!1);if(H(),f.useEffect((()=>{a||(u(!0),s(k(!1)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,H as u};
|