@zeniai/web-app-ui 5.1.54-qa → 5.1.55-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-ENVkkepY.js +1 -0
- package/dist/assets/AddressScreen-CvPxhYFs.js +9 -0
- package/dist/assets/{AiCfoScreen-CuCVJ-9z.js → AiCfoScreen-DTTgGSqT.js} +1 -1
- package/dist/assets/BillPayApprovalRoutes-2y_Smb3L.js +1 -0
- package/dist/assets/{BillPayRoutes-C-57jjzC.js → BillPayRoutes-D1KmPs-P.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CoxJBcce.js → BusinessVerificationPageScreen-D2N5zUvV.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BXut6M7h.js → CardsAiCfoScreen-bhVF9e_F.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DAakvdza.js → ChargeCardRoutes-YoDH7ylN.js} +1 -1
- package/dist/assets/CompanyPassportScreen-CfrYFFuL.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-BOHdbzkN.js → ConnectionAuthScreen-B6tGghLx.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CpXzEPeL.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-Dh6ZowLh.js → CustomerOnboardingRoutes-BAxjCtaH.js} +3 -3
- package/dist/assets/{DashboardRoutes-Cox4nEtE.js → DashboardRoutes-Cnv2Os-7.js} +1 -1
- package/dist/assets/{DefaultTenantHome-DsGlDo8q.js → DefaultTenantHome-D1mjvDxR.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-Dwlu904z.js → DomesticWireDetailScreen-DEZpmV1y.js} +1 -1
- package/dist/assets/DrawerScreen-CfPgZFbu.js +1 -0
- package/dist/assets/EntityDetailRoutes-ByNAOdBV.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-CKsYpo_A.js → ExpenseAutomationRoutes-UMX9R2ZB.js} +1 -1
- package/dist/assets/FeaturePreviewScreen-Bbo-4gXG.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-074s_I3B.js → HubSpotOAuthCallbackScreen-Cngdo8vI.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-Cu1l5Hae.js → MagicLinkRoutes-CP3FxH4t.js} +6 -6
- package/dist/assets/MagicLinkSignInScreen-DfMGZywc.js +12 -0
- package/dist/assets/{MobileAppDrawer-BPYh3fz7.js → MobileAppDrawer-CWBhYKqW.js} +1 -1
- package/dist/assets/NotFoundScreen-Bnx2UPHv.js +1 -0
- package/dist/assets/{NotificationRoutes-CM26Uc2-.js → NotificationRoutes-Qy8HYHkb.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-OutOQhzE.js → OAuthConsentScreen-DffRqRWT.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-B0qogd0A.js → PandLWithForecastRoutes-DzMNbzsJ.js} +1 -1
- package/dist/assets/{PeopleRoutes-CUTyVwx1.js → PeopleRoutes-DwtjCeU9.js} +2 -2
- package/dist/assets/{PerformanceRoutes-12eFPdp_.js → PerformanceRoutes-DJjg_nmN.js} +1 -1
- package/dist/assets/{Preview-DIHwHgF2.js → Preview-JiizEL_C.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-D87ZntTL.js → QBOConnectionScreen-BD3gRv9C.js} +1 -1
- package/dist/assets/ReferralListScreen-DPPvxoTI.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-BwiPly2p.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-CcTmDK2L.js +1 -0
- package/dist/assets/{ReimbursementRoutes-DSyBtaLh.js → ReimbursementRoutes-DHjMtvfB.js} +5 -5
- package/dist/assets/{ReportsRoutes-CrvdJeby.js → ReportsRoutes-B4rkl99K.js} +1 -1
- package/dist/assets/{RewardsRoutes-DYWFgTvw.js → RewardsRoutes-CmWH02Nb.js} +1 -1
- package/dist/assets/ScreenRoutes-BVhH5D33.js +2 -0
- package/dist/assets/{SettingsRoutes-D-CGv9n3.js → SettingsRoutes-Bvbg8LVY.js} +1 -1
- package/dist/assets/{SetupPagesScreen-Bfb-yG5Q.js → SetupPagesScreen-N7NZbMog.js} +1 -1
- package/dist/assets/SignInScreen-DqCXO7t5.js +1 -0
- package/dist/assets/SignOutScreen-PgaK8hUe.js +9 -0
- package/dist/assets/{TaskListScreen-SFzbbBq2.js → TaskListScreen-DNjQxRsg.js} +2 -2
- package/dist/assets/{TaskRoutes-CgfIdOfE.js → TaskRoutes-DddYQsp2.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-BX1iNIyW.js → TransactionDetailRoutes-9wsPGvQA.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-bJ4okRq5.js → TransactionDetailScreen-DdyjxpNe.js} +1 -1
- package/dist/assets/{TransactionListRoutes-C7_m6Yqx.js → TransactionListRoutes-Y3HUjCX4.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CueVe1jr.js → TreasuryRoutes-Po66nW-G.js} +6 -6
- package/dist/assets/{VendorsRoutes-DrErfdsR.js → VendorsRoutes-Bhe46MLu.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-gcw35kRr.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-_K25ghKx.js → ZeniAccountRoutes-BVrcLxAX.js} +9 -9
- package/dist/assets/ZeniAccountStatementScreen-NjdxQEux.js +9 -0
- package/dist/assets/{accountMappingHelper-BSLlTYQH.js → accountMappingHelper-BfrLGhoG.js} +1 -1
- package/dist/assets/{analytics-BHHyMpuV.js → analytics-CQmVOD4d.js} +1 -1
- package/dist/assets/{analyticsHelper-BsjRdUZX.js → analyticsHelper-Bvqx3iRr.js} +1 -1
- package/dist/assets/{core-CLKYLs-8.js → core-CbpoBsNm.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Bm32N7cj.js → decodeURIComponentSafe-9Mzf3G8U.js} +1 -1
- package/dist/assets/{dnd-BgEYAbRi.js → dnd-CX5suNP6.js} +1 -1
- package/dist/assets/{empty-CwSgGrxu.js → empty-BijKctOw.js} +1 -1
- package/dist/assets/{empty-DdtYEopm.js → empty-DhAifQ6-.js} +1 -1
- package/dist/assets/{emptyVideoElement-D6kbFw8A.js → emptyVideoElement-D-mIIbkx.js} +1 -1
- package/dist/assets/epic-D_RLnD_Y.js +2 -0
- package/dist/assets/{getLocaleForTenant-C_VQis3o.js → getLocaleForTenant-9euvow3p.js} +1 -1
- package/dist/assets/{index-DR5HeC7u.js → index-B781xFYL.js} +2 -2
- package/dist/assets/{index-UrW8im9e.js → index-Bg6fgf4p.js} +1 -1
- package/dist/assets/{index-Dr5dodMd.js → index-CR_Xz42r.js} +1 -1
- package/dist/assets/{index-CTH1zZXf.js → index-CTRa-Eva.js} +1 -1
- package/dist/assets/{index-CtRgwYlG.js → index-D-GsKzyX.js} +1 -1
- package/dist/assets/{index-DxSdRLh_.js → index-Mdt1gUpR.js} +1 -1
- package/dist/assets/{index-D_hiFYsE.js → index-aZImxzjX.js} +11456 -11456
- package/dist/assets/{index-BzKXgra3.js → index-cXBO33fb.js} +1 -1
- package/dist/assets/{lexical-DN4b_Twn.js → lexical-BS7d_1CV.js} +1 -1
- package/dist/assets/{liveblocks-B6jAIe9x.js → liveblocks-BLlSTcoD.js} +1 -1
- package/dist/assets/{lottie-C38Bn-X6.js → lottie-BY8e0Ufw.js} +1 -1
- package/dist/assets/{mui-AZmtqUsi.js → mui-DcNGd9L2.js} +1 -1
- package/dist/assets/{pathToGoBack-ogdURlZM.js → pathToGoBack-C2QnAeVh.js} +1 -1
- package/dist/assets/{pdf-BzNDzZ8_.js → pdf-BslZhgI8.js} +4 -4
- package/dist/assets/{pdf-lib-0dW_LSbG.js → pdf-lib-BxiXr152.js} +1 -1
- package/dist/assets/{plaid-2Q72y6JT.js → plaid-B62punae.js} +1 -1
- package/dist/assets/{pusher-DsUo-9K1.js → pusher-yI34WBaU.js} +1 -1
- package/dist/assets/{react-DsxTC2P5.js → react-BhNVTcBK.js} +1 -1
- package/dist/assets/{react-C_zFJEm7.js → react-Bxt57-xI.js} +1 -1
- package/dist/assets/{react-DoYlyteP.js → react-CcJOgdcP.js} +1 -1
- package/dist/assets/{react-Ckos0IeG.js → react-D4d29E8H.js} +1 -1
- package/dist/assets/{react-BvYGWaT4.js → react-DP_wuGKo.js} +1 -1
- package/dist/assets/{react-BpYPYN78.js → react-bALoVfnT.js} +1 -1
- package/dist/assets/{recharts-CyaYjFwn.js → recharts-C0aThBg3.js} +1 -1
- package/dist/assets/{routePaths-XSngD1ow.js → routePaths-DyIc-n3M.js} +1 -1
- package/dist/assets/{sentry-95bdnR3R.js → sentry-D_xp3E3Q.js} +1 -1
- package/dist/assets/{url-Br2V-Pa5.js → url-Cn_1-HsX.js} +1 -1
- package/dist/assets/{url-C5803Pxi.js → url-DZdoYQOC.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CmgL0oiB.js → useAiCfoDashboardSuggestedQuestionsChips-ClwyrxTK.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BZImc5qT.js +1 -0
- package/dist/assets/{useCashManagementBanner-Dy5XCSd3.js → useCashManagementBanner-BWjfwjGa.js} +1 -1
- package/dist/assets/{useDeviceId-B5LKCqFY.js → useDeviceId-BX67JldO.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-D1F5GLCG.js → useInitialThreadRequest-DVxzaQcg.js} +1 -1
- package/dist/assets/{utils-CDpOkGne.js → utils-BQO84dIV.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-kr0tYyxP.js → withTransactionSidePanel-MinVWpma.js} +1 -1
- package/dist/assets/{zeni-epic-state-CjQblqOQ.js → zeni-epic-state-CkeDRiud.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-B9BoI8Fv.js +0 -1
- package/dist/assets/AddressScreen-BRdhnUB3.js +0 -9
- package/dist/assets/BillPayApprovalRoutes-BrRYqqLJ.js +0 -1
- package/dist/assets/CompanyPassportScreen-DUlm9sdh.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BQyQByde.js +0 -1
- package/dist/assets/DrawerScreen-KqrF4Sq7.js +0 -1
- package/dist/assets/EntityDetailRoutes-COXR1SAJ.js +0 -1
- package/dist/assets/FeaturePreviewScreen-CNGfajWs.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-iqOI3pqv.js +0 -12
- package/dist/assets/NotFoundScreen-ChEBjJeL.js +0 -1
- package/dist/assets/ReferralListScreen-BsBo666O.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-ClbZ-O2b.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-D_Tk1V_u.js +0 -1
- package/dist/assets/ScreenRoutes-BE5zmBx7.js +0 -2
- package/dist/assets/SignInScreen-DKI-p16g.js +0 -1
- package/dist/assets/SignOutScreen-C2_s3moc.js +0 -9
- package/dist/assets/WiseConfirmationScreen-DrQXGVBy.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-Be29Xc0Q.js +0 -9
- package/dist/assets/epic-DZb8kqBH.js +0 -2
- package/dist/assets/useAskAiCfoHostNavButtonProps-FETbJUjN.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-BLlSTcoD.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-D_xp3E3Q.js";import{L as dt,bY as Tc,eW as Ac,Ly as Rc,M0 as kl,c7 as Tl,f_ as Al,f$ as Rl}from"./zeni-epic-state-CkeDRiud.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-BQO84dIV.js";import{r as un}from"./empty-DhAifQ6-.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-BxiXr152.js";import{r as Gl}from"./index-D-GsKzyX.js";import{r as zl}from"./index-Bg6fgf4p.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-CbpoBsNm.js";import{u as Kl,z as Pc,L as Wl,O as Jl,Q as Xl,h as Ql,d as tf}from"./index-aZImxzjX.js";import"./mui-DcNGd9L2.js";import{d as Pe}from"./decodeURIComponentSafe-9Mzf3G8U.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="6c38cfeb-aef0-4018-aef4-876ae2644f5d",t._sentryDebugIdIdentifier="sentry-dbid-6c38cfeb-aef0-4018-aef4-876ae2644f5d")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-BLlSTcoD.js";import{a as o}from"./sentry-D_xp3E3Q.js";import{j as f,h as F,u as H,g as _,n as V}from"./core-CbpoBsNm.js";import{m as W,K as M,z as R,bb as U,G as N,X as $,_ as z,A as G,d as l,f as X,a7 as K,bc as q}from"./index-aZImxzjX.js";import{fF as J,eW as Q,OS as P,OT as Y,vs as Z,vi as g,fH as ee,bS as re,vn as ae,OU as ne}from"./zeni-epic-state-CkeDRiud.js";import{D as te,e as se,n as oe,S as ie}from"./mui-DcNGd9L2.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-BZImc5qT.js";import{M as ce}from"./MobileAppDrawer-CWBhYKqW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="8e93c2d2-bf91-426f-b382-c546c634b3c4",e._sentryDebugIdIdentifier="sentry-dbid-8e93c2d2-bf91-426f-b382-c546c634b3c4")}catch{}})();const de={overlayWidth:new N(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=W(),n=M();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(c=>J(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,I="refer-and-earn-status-update",we=V(function(e){const r=P(e),a=e.referralViewState.rewardsPlanFetchState,n=re([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(ae(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(K(q));function Se({isReferralDrawerOpen:e}){const r=F(),a=H(),n=_(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,C]=o.useState(!1),w=R.getSignedInUser(),b=f(t=>Q(t)),h=f(t=>P(t)),m=h.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),v=Y([h,p]),{areTenantIdsInSync:d}=$();o.useEffect(()=>{b?.rewardsLastViewedTime==null&&D===!1&&(a(Z()),E(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&d&&(u(!0),a(g(!0)))},[m,a,d]),o.useEffect(()=>{!c&&p.fetchState==="Not-Started"&&d&&(x(!0),a(ee(!0)))},[p,a,d]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),S=t=>{A(t)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:T}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:v===!0});const L={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,y,B)=>{B.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[v===!0?s.jsx(G,{analytics:l,onLoad:t=>(y=>{w!=null&&y.trackPageLoaded(X.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:S}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{C(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:r,currentTenant:b,onClickMenuIcon:()=>{S(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:T,...L})]})}export{Se as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-BLlSTcoD.js";import F from"./NotFoundScreen-Bnx2UPHv.js";import{a as p}from"./sentry-D_xp3E3Q.js";import{h as E,g as x,u as C,j as u,N as D,n as k,o as O,p as b}from"./core-CbpoBsNm.js";import{eW as I,PM as g,Q0 as S,Ff as V,Eo as U,Fe as d,F5 as B,Qg as L,Fh as _}from"./zeni-epic-state-CkeDRiud.js";import{z as N,a7 as T,bW as z,af as W,bz as Q,bX as K}from"./index-aZImxzjX.js";import"./mui-DcNGd9L2.js";import{u as M,R as A}from"./ReimbursementApprovalRuleDetailScreen-CcTmDK2L.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]="382b8b33-818c-402e-82de-ca2466a23353",e._sentryDebugIdIdentifier="sentry-dbid-382b8b33-818c-402e-82de-ca2466a23353")}catch{}})();const y="reimbursement-approval-rule-update",P=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(L(!1))},onBackClick:()=>{W(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})(T(z)),X=({isLoading:e})=>{const o=E(),s=x(),n=C(),[t,i]=p.useState(!1),[m,h]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a)),v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(h(!0),n(d())),o("./new"))},[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,$,R)=>{a.endsWith(y)&&R.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(P,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",q=k(function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(L(!1))},onBackClick:()=>{W(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(_(t,!0))}}})(T(K)),G=()=>{const e=u(n=>I(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=Q(e?.tenantId);return o?r.jsx(H,{isLoading:s}):r.jsx(X,{isLoading:s})},H=({isLoading:e})=>{const o=E(),s=x(),n=C(),[t,i]=p.useState(!1),[m,h]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a));M();const v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(h(!0),n(d())),o("./new"))},[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,$,R)=>{a.endsWith(j)&&R.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(O,{children:[r.jsx(b,{path:"/",element:r.jsx(G,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(F,{})})]})}export{oe as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as h}from"./liveblocks-BLlSTcoD.js";import{a as f}from"./sentry-D_xp3E3Q.js";import{u as w,j as y,h as _,g as O,i as k,n as F}from"./core-CbpoBsNm.js";import{kT as z,Q0 as T,PM as U,F8 as V,Fk as B,Ff as A,Fg as E,Q1 as j,eW as M,Fe as Q}from"./zeni-epic-state-CkeDRiud.js";import{z as N,m as P,B as $,bM as W,af as q,bz as K,bN as G}from"./index-aZImxzjX.js";import"./mui-DcNGd9L2.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]="2343f18b-bf70-49ed-929f-d2c5a2200d3a",e._sentryDebugIdIdentifier="sentry-dbid-2343f18b-bf70-49ed-929f-d2c5a2200d3a")}catch{}})();function H(){const e=w(),s=f.useRef(!1),t=y(o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started"),p=y(o=>o.vendorListState.allVendorIdsBillsTab.length>0);f.useEffect(()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(z({})))},[p,t,e])}const J=F(function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===s.approvalRuleId)===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=v=>{const b=[];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 g=(S=m.value,j(S)==null);var S;return{type:g?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!g}}),c=I.concat(R);b.push({action:d.stepType.selectedOption,actors:c,operator:c.length>1?d.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),b},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:l,criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}})(W);function X(){const e=_(),s=w(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=y(n=>T(n)),i=y(n=>U(n)),[a,u]=f.useState(!1);if(f.useEffect(()=>{a||(u(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=F(function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:U(e).allApprovalRules}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=c=>{const m=[];return c.forEach(g=>{const S=g.actorKind?.selectedOption,x=g.selectedRole?.selectedOption;let D=[];S==="role"&&x!=null?D=[{type:"attribute",subType:x,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(g.persons?.selectedUsers??[]).map(L=>({type:"user",subType:void 0,userId:L.userId,idType:"user",isImplicitActor:!1})));const C=g.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,b=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=b?.selection.selectedOptions??[];if(R.length>0&&(d.department={type:"department",operator:b?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(Q(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}})(G);function ne(){const e=y(t=>M(t)),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?h.jsx(Z,{}):h.jsx(X,{})}function Z(){const e=_(),s=w(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=y(n=>T(n)),i=y(n=>U(n)),[a,u]=f.useState(!1);if(H(),f.useEffect(()=>{a||(u(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,H as u};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-B6jAIe9x.js";import{h as W,u as re,g as H,i as X,j as E,N as _,n as J,l as mt,o as ct,p as C}from"./core-CLKYLs-8.js";import{eW as Z,Qh as le,c7 as me,Ej as Be,kC as dt,Ew as ne,Ev as ae,Qi as ut,bn as ce,gn as Te,Qj as pt,ME as bt,kr as je,MF as Se,MG as gt,jm as ht,Py as ft,jB as St,E7 as It,tZ as yt,jt as Rt,ET as De,Qk as Fe,Ql as At,Qm as kt,Qn as vt,Qo as Ct,Qp as Et,ED as Ie,jH as wt,PH as xt,Ex as Bt,Eh as Tt,Qq as jt,Eg as Dt,Qr as Ft,Ep as ye,EH as Ut,EG as Lt,EC as Pt,Qs as Ue,JS as $t,bo as Mt,Es as _t,F9 as Qt,Qt as Nt,Qu as Ot,EP as zt,EM as Re,P1 as Gt,Ee as Ht,Qv as Le,FB as Ae,FJ as Zt,Qw as Vt,Qx as z,Qy as Wt,Qz as Pe,QA as Jt,QB as $e,QC as Me,E$ as se,bu as qt,bK as de,cH as ue,fB as _e,fz as Qe,QD as Kt,fw as Xt,Pe as Yt,QE as en,QF as Ne,Pi as tn,Q0 as nn,QG as an,Qg as sn,FG as ke,FF as on,QH as rn,QI as ln,QJ as mn,QK as cn,QL as dn,PN as un,Fw as pn,FA as bn,bt as gn,bJ as hn,cB as fn,cp as Sn,bs as In,LA as yn,cR as Rn,cT as An,cS as kn,cA as vn}from"./zeni-epic-state-CjQblqOQ.js";import{w as Oe,K as ze,F as Y,x as k,z as $,bY as Ge,A as ee,c as v,aH as ve,o as D,at as K,I as Cn,D as He,bZ as En,r as G,_ as Ze,b_ as wn,j as te,b$ as xn,X as Bn,E as Tn,B as pe,e as Ve,a7 as jn,bk as Dn,a2 as Fn,m as We,c0 as Un,a9 as Ln}from"./index-D_hiFYsE.js";import{n as Q,S as Pn}from"./mui-AZmtqUsi.js";import ie from"./NotFoundScreen-ChEBjJeL.js";import{S as Ce}from"./SetupPagesScreen-Bfb-yG5Q.js";import{F as Je}from"./FeaturePreviewScreen-CNGfajWs.js";import{a as f}from"./sentry-95bdnR3R.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import{u as qe}from"./useInitialThreadRequest-D1F5GLCG.js";import{D as $n}from"./DrawerScreen-KqrF4Sq7.js";import{M as Ke}from"./MobileAppDrawer-BPYh3fz7.js";import{R as Mn}from"./ReimbursementApprovalRoutes-ClbZ-O2b.js";import{FallBackRoute as _n}from"./ScreenRoutes-BE5zmBx7.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.js";import"./analyticsHelper-BsjRdUZX.js";import"./routePaths-XSngD1ow.js";import"./BusinessVerificationPageScreen-CoxJBcce.js";import"./ReimbursementApprovalRuleDetailScreen-D_Tk1V_u.js";import"./getLocaleForTenant-C_VQis3o.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]="bb6726cd-25e0-4603-9ff1-4a023c11b5c4",e._sentryDebugIdIdentifier="sentry-dbid-bb6726cd-25e0-4603-9ff1-4a023c11b5c4")}catch{}})();const Xe=e=>`/${e}/reimbursements`,Qn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=He.getLocalizedStrings(),Nn=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Xe(o),l=G(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=W(),t=re(),n=H(),{reimbursementId:r}=X(),d=Oe(),c=ze(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Y(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=H().pathname,j=w.includes("edit"),A=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=$.getSignedInUser(),I=E(p=>Z(p)),g=E(p=>le(p,r)),P=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const M=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ge,{isNewReimbursement:r==null}):s.jsxs(On,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(V=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&V.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(zn,{}):null,m&&c!=="small"?s.jsx(Gn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Zn,{onClick:()=>o(!1),children:s.jsx(Qn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(Nn,{initialOpenThreadRequest:P??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const On=Q.div`
|
|
1
|
+
import{j as s}from"./liveblocks-BLlSTcoD.js";import{h as W,u as re,g as H,i as X,j as E,N as _,n as J,l as mt,o as ct,p as C}from"./core-CbpoBsNm.js";import{eW as Z,Qh as le,c7 as me,Ej as Be,kC as dt,Ew as ne,Ev as ae,Qi as ut,bn as ce,gn as Te,Qj as pt,ME as bt,kr as je,MF as Se,MG as gt,jm as ht,Py as ft,jB as St,E7 as It,tZ as yt,jt as Rt,ET as De,Qk as Fe,Ql as At,Qm as kt,Qn as vt,Qo as Ct,Qp as Et,ED as Ie,jH as wt,PH as xt,Ex as Bt,Eh as Tt,Qq as jt,Eg as Dt,Qr as Ft,Ep as ye,EH as Ut,EG as Lt,EC as Pt,Qs as Ue,JS as $t,bo as Mt,Es as _t,F9 as Qt,Qt as Nt,Qu as Ot,EP as Gt,EM as Re,P1 as zt,Ee as Ht,Qv as Le,FB as Ae,FJ as Zt,Qw as Vt,Qx as G,Qy as Wt,Qz as Pe,QA as Jt,QB as $e,QC as Me,E$ as se,bu as qt,bK as de,cH as ue,fB as _e,fz as Qe,QD as Kt,fw as Xt,Pe as Yt,QE as en,QF as Ne,Pi as tn,Q0 as nn,QG as an,Qg as sn,FG as ke,FF as on,QH as rn,QI as ln,QJ as mn,QK as cn,QL as dn,PN as un,Fw as pn,FA as bn,bt as gn,bJ as hn,cB as fn,cp as Sn,bs as In,LA as yn,cR as Rn,cT as An,cS as kn,cA as vn}from"./zeni-epic-state-CkeDRiud.js";import{w as Oe,K as Ge,F as Y,x as k,z as $,bY as ze,A as ee,d as v,aH as ve,o as D,at as K,I as Cn,D as He,bZ as En,s as z,_ as Ze,b_ as wn,j as te,b$ as xn,X as Bn,G as Tn,B as pe,f as Ve,a7 as jn,bk as Dn,a2 as Fn,m as We,c0 as Un,a9 as Ln}from"./index-aZImxzjX.js";import{n as Q,S as Pn}from"./mui-DcNGd9L2.js";import ie from"./NotFoundScreen-Bnx2UPHv.js";import{S as Ce}from"./SetupPagesScreen-N7NZbMog.js";import{F as Je}from"./FeaturePreviewScreen-Bbo-4gXG.js";import{a as f}from"./sentry-D_xp3E3Q.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-BZImc5qT.js";import{u as qe}from"./useInitialThreadRequest-DVxzaQcg.js";import{D as $n}from"./DrawerScreen-CfPgZFbu.js";import{M as Ke}from"./MobileAppDrawer-CWBhYKqW.js";import{R as Mn}from"./ReimbursementApprovalRoutes-BwiPly2p.js";import{FallBackRoute as _n}from"./ScreenRoutes-BVhH5D33.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";import"./analyticsHelper-Bvqx3iRr.js";import"./routePaths-DyIc-n3M.js";import"./BusinessVerificationPageScreen-D2N5zUvV.js";import"./ReimbursementApprovalRuleDetailScreen-CcTmDK2L.js";import"./getLocaleForTenant-9euvow3p.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]="1f9b21a6-6436-4c79-9d25-29dfd063cd1a",e._sentryDebugIdIdentifier="sentry-dbid-1f9b21a6-6436-4c79-9d25-29dfd063cd1a")}catch{}})();const Xe=e=>`/${e}/reimbursements`,Qn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=He.getLocalizedStrings(),Nn=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Xe(o),l=z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=W(),t=re(),n=H(),{reimbursementId:r}=X(),d=Oe(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Y(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=H().pathname,j=w.includes("edit"),A=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=$.getSignedInUser(),I=E(p=>Z(p)),g=E(p=>le(p,r)),P=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const M=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(ze,{isNewReimbursement:r==null}):s.jsxs(On,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(V=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&V.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(zn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Zn,{onClick:()=>o(!1),children:s.jsx(Qn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(Nn,{initialOpenThreadRequest:P??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const On=Q.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
5
5
|
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
6
|
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,
|
|
7
|
+
`,Gn=Q.div`
|
|
8
8
|
position: fixed;
|
|
9
9
|
top: 0;
|
|
10
10
|
left: 0;
|
|
@@ -12,7 +12,7 @@ import{j as s}from"./liveblocks-B6jAIe9x.js";import{h as W,u as re,g as H,i as X
|
|
|
12
12
|
bottom: 0;
|
|
13
13
|
background-color: ${Cn.overlayBackgroundBlack};
|
|
14
14
|
z-index: 5;
|
|
15
|
-
`,
|
|
15
|
+
`,zn=Q.div`
|
|
16
16
|
position: absolute;
|
|
17
17
|
top: 0;
|
|
18
18
|
left: 0;
|
|
@@ -53,7 +53,7 @@ import{j as s}from"./liveblocks-B6jAIe9x.js";import{h as W,u as re,g as H,i as X
|
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Wn=J(function(e,t){const n=Ue(e,t.reimbursementId),r=$.getSignedInUser(),d=ce(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Nt(n.remiActivities,Ot(t.currentTenant),r));const i=me(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Fe());const a=Xe(o),i=
|
|
56
|
+
`,Wn=J(function(e,t){const n=Ue(e,t.reimbursementId),r=$.getSignedInUser(),d=ce(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Nt(n.remiActivities,Ot(t.currentTenant),r));const i=me(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Fe());const a=Xe(o),i=z(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Ht(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Re(n,a.type,"")):e(Re(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=z(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(De(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(wn);function Jn(){const e=W(),t=re(),n=H(),r=n.hash.substring(1),d=Oe(),{reimbursementId:c}=X(),m=$.getSignedInUser(),o=E(y=>Z(y)),a=E(y=>Ue(y,c??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=qe(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=be({mobileExploreReferrer:"Reimbursement Details"});Ze({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=Y(),{isFeatureEnabled:T}=h(k.isLimitedCategoryForReimbursement),[u,w]=f.useState(!1),[j,A]=f.useState(!1),[F,x]=f.useState(!1),{isFeatureEnabled:B}=h(k.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(k.isShowDeletedReimbursementsFeatureEnabled),g=E(y=>le(y,c??"")),P=$t(o),U=Mt(o.userRole),M=a.fetchState;if(f.useEffect(()=>{u||c==null?u==1&&M==="Error"&&e("page-not-found",{replace:!0}):(w(!0),t(_t(c,!1,I)))},[u,c,t,M]),f.useEffect(()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&P===!1?x(!1):x(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find(y=>y.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,P,m]),f.useEffect(()=>{j||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(A(!0),t(Be(!1,T,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Qt(!1,!0,!0,a.lastUpdatedByUserId)))},[j,a,c,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(_,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(ze,{}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:y=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(y)}),s.jsx(Wn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:B,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:F,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:R})]})}const qn=J(function(e,t){return{remisReviewView:Le(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(G())},onCloseReviewItem:n=>{e(Vt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Zt());break;case"approve":e(Ae("approved",r??""));break;case"reject":e(Ae("rejected",r??""))}}}})(xn);function Kn(){const e=W(),t=E(c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=E(c=>Le(c)),r=te(),d=r?.loggedInUserRole?.includes("admin")===!0;return f.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(qn,{navigate:e,analytics:v,isAdmin:d})}const O=tn(),Ye="bulk-operation-update",oe="reimbursement-approval-rule-update",{spendManagement:Xn,common:we}=He.getLocalizedStrings(),xe=Xn.reimbursement.bulkActions,Yn=Q.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
min-height: 100%;
|
|
59
59
|
width: 100%;
|
|
@@ -61,7 +61,7 @@ import{j as s}from"./liveblocks-B6jAIe9x.js";import{h as W,u as re,g as H,i as X
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ea=J(function(e,t){const n=Me(e,O,t.isBulkActionEnabled);let r=n.allSubTabs;const d=$.getSignedInUser(),c=ce(d),m=e.tenantState.currentTenantId,o=Z(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,R=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:O,spendManagementEndPoint:`${Fn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:R.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(
|
|
64
|
+
`,ea=J(function(e,t){const n=Me(e,O,t.isBulkActionEnabled);let r=n.allSubTabs;const d=$.getSignedInUser(),c=ce(d),m=e.tenantState.currentTenantId,o=Z(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,R=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:O,spendManagementEndPoint:`${Fn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:R.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(G()),e(Pe(o))},onSubtabChange:o=>{e(G()),e($e(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=z(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=z(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=z(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(se(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(G())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(ke("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(ke("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(oe)&&e(sn(!1))},onEventReceived:o=>{o===Ye&&e(an())}}})(jn(Dn));function ta(){const e=W(),t=re(),n=H(),r=n.state,d=Ge(),[c,m]=f.useState(null),o=mt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect(()=>{if(r?.tab!=null&&r?.subTab!=null){const S=Wt(r.tab.toString());S!=null?t(Pe(S)):console.log("Warning:Not a valid remiListTab");const N=Jt(r.subTab.toString());N!=null?t($e(N)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(G())}},[]);const{useFeatureGate:a}=Y(),{isFeatureEnabled:i}=a(k.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(k.isBillPayCommentingEnabled),{isFeatureEnabled:R}=a(k.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(k.isReimbursementBulkActionEnabled),T=$.getSignedInUser(),u=E(S=>Z(S)),[w,j]=f.useState(!1),[A,F]=f.useState(!1),x=te(),B=x?.loggedInUserRole?.includes("admin")===!0,I=E(S=>Me(S,O,h)),{areTenantIdsInSync:g}=Bn(),P=I.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:M}=be({mobileExploreReferrer:"Reimbursement List"});if(Ze({isDataReady:P==="Completed"}),f.useEffect(()=>{!A&&g&&(F(!0),t(se(O,!0,l,!1,!0)))},[A,O,t,g]),T==null)throw Error("Can't access address page without signing in...");const y=!!u?.userRole&&qt(u),p=de(x?.loggedInUserRoleMap),V=ue(x?.loggedInUserRoleMap),et=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,tt=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,nt=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,at=E(S=>Te(S.companyState,u.companyId)),st=at?.company.featuresActivationInfo.connectedAccountProvider,ge=S=>{j(S)},{isFeatureEnabled:it}=a(k.isDebitCardFeatureEnabled),ot=_e(it,u),rt=Qe(u),{remisProcessed:q,remisProcessing:he}=E(S=>Kt(S));f.useEffect(()=>{q===he&&c!=null&&(t(Xt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:q>1?xe.reports:xe.report},{variableName:"_has_",variableValue:q>1?we.texts.have:we.texts.has},{variableName:"_action_",variableValue:Yt(c)}]})),t(en()),setTimeout(()=>{t(se(O,!0,l,!1,!0,!0))},3e3),m(null))},[q,he]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${Ye}`,`private-encrypted-${u.companyId}.${oe}`]:[],eventCallback:(S,N,fe)=>{S.endsWith(oe)?fe.onReimbursementApprovalRulesEventReceived?.(S):N.entity_type==="reimbursement"&&(m(N.operation_type),fe.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?ot===!0||rt===!0?s.jsx(Je,{}):tt&&(!y||p)||V&&et?s.jsxs(s.Fragment,{children:[P==="Completed"?s.jsx(ee,{analytics:v,onLoad:S=>(N=>N.trackPageLoaded(Ve.Event.reimbursementHome))(S)}):null,s.jsx(Ke,{isAppContentDrawerOpen:w,handleDrawerToggle:ge}),s.jsxs(Yn,{windowSize:d,children:[s.jsx($n,{isOpen:o,drawerLeftMargin:new Tn(0,0,300,600),onClose:()=>{e("./"),t(G())},children:s.jsx(sa,{onClick:S=>S.stopPropagation(),children:s.jsx(Kn,{})})}),s.jsx(ea,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:R,location:n,navigate:e,currentTenant:u,period:O,isAdmin:B,isEmployee:y,entity:"reimbursement",onClickMenuIcon:()=>{ge(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:st,isBulkActionEnabled:h,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:U,onAskAiCfoClick:M,...lt})]})]}):nt&&p?s.jsx(_,{to:"../setup"}):x!=null&&Ne(u,x.loggedInUserRoleMap)?s.jsx(_,{to:"../promo"}):s.jsx(pe,{fetchState:"In-Progress"}):s.jsx(ie,{})}const na=e=>`/${e}/reimbursements/setup`,aa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},sa=Q(Pn)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-B6jAIe9x.js";import{g as G,h as ge,u as Ce,i as Ie,j as d,n as we,o as Se,p as Y}from"./core-CLKYLs-8.js";import{eW as v,fQ as I,M1 as Te,kr as J,qM as K,rB as A,kf as Re,jj as Me,uY as X,rG as Oe,bt as Ae,M2 as ke,bn as Fe,w5 as je,M3 as De,M4 as Ee,uQ as Pe,M5 as H,M6 as ve,M7 as Be,M8 as Le,M9 as Ve,Ma as w,Mb as k,Mc as F,Md as N,Me as j,Mf as D,dJ as Ue,vN as xe,vB as $,vC as q,vT as ze,vG as Z,vZ as Ge,Mg as Ye,Mh as He,Mi as Ne,Mj as $e,Mk as qe,fB as Ze,fz as Qe}from"./zeni-epic-state-CjQblqOQ.js";import{T as We,U as Je,V as Ke,W as Xe,K as ea,F as ee,x as E,z as ae,X as aa,j as sa,a as ta,Z as oa,_ as na,A as ra,c as P,e as ia,$ as la,r as se,a0 as ca,a1 as da,a2 as pa}from"./index-D_hiFYsE.js";import"./mui-AZmtqUsi.js";import fa from"./NotFoundScreen-ChEBjJeL.js";import{F as ma}from"./FeaturePreviewScreen-CNGfajWs.js";import{a as _}from"./sentry-95bdnR3R.js";import{u as ua}from"./useInitialThreadRequest-D1F5GLCG.js";import{t as Q,a as W,b as _a}from"./routePaths-XSngD1ow.js";import{M as ha}from"./MobileAppDrawer-BPYh3fz7.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.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]="e7bb6dc9-299a-475c-8910-daba9eecab4d",e._sentryDebugIdIdentifier="sentry-dbid-e7bb6dc9-299a-475c-8910-daba9eecab4d")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(D({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(He()),e(Ne()),e($e()),e(qe())},ga=we(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=ke(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:K(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ye(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e($(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(D({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(k({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Le({viewMode:a})),e(Ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Be({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ya(e),e(De(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),f=ea(),u=da(f),a=ge(),s=Ce(),t=G(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[B,te]=_.useState(!1),{isFeatureEnabled:L}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>v(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(L?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>J(n)),M=d(n=>K(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(A(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!B&&C==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))},[i,B,C,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":M&&s(X());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&Ae(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=We(he??"")==="reports",be=Je(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Ke({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:L,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ze(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(Y,{path:"/",element:p.jsx(Ca,{})}),p.jsx(Y,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
1
|
+
import{j as p}from"./liveblocks-BLlSTcoD.js";import{g as G,h as ge,u as Ce,i as Ie,j as d,n as we,o as Se,p as Y}from"./core-CbpoBsNm.js";import{eW as v,fQ as I,M1 as Te,kr as J,qM as K,rB as A,kf as Re,jj as Me,uY as X,rG as Oe,bt as Ae,M2 as ke,bn as Fe,w5 as je,M3 as De,M4 as Ee,uQ as Pe,M5 as H,M6 as ve,M7 as Be,M8 as Le,M9 as Ve,Ma as w,Mb as k,Mc as F,Md as N,Me as j,Mf as D,dJ as Ue,vN as xe,vB as $,vC as q,vT as ze,vG as Z,vZ as Ge,Mg as Ye,Mh as He,Mi as Ne,Mj as $e,Mk as qe,fB as Ze,fz as Qe}from"./zeni-epic-state-CkeDRiud.js";import{T as We,U as Je,V as Ke,W as Xe,K as ea,F as ee,x as E,z as ae,X as aa,j as sa,a as ta,Z as oa,_ as na,A as ra,d as P,f as ia,$ as la,s as se,a0 as ca,a1 as da,a2 as pa}from"./index-aZImxzjX.js";import"./mui-DcNGd9L2.js";import fa from"./NotFoundScreen-Bnx2UPHv.js";import{F as ma}from"./FeaturePreviewScreen-Bbo-4gXG.js";import{a as _}from"./sentry-D_xp3E3Q.js";import{u as ua}from"./useInitialThreadRequest-DVxzaQcg.js";import{t as Q,a as W,b as _a}from"./routePaths-DyIc-n3M.js";import{M as ha}from"./MobileAppDrawer-CWBhYKqW.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.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]="afe54083-556e-42a6-a629-4f9d0f79899d",e._sentryDebugIdIdentifier="sentry-dbid-afe54083-556e-42a6-a629-4f9d0f79899d")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(D({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(He()),e(Ne()),e($e()),e(qe())},ga=we(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=ke(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:K(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ye(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e($(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(D({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(k({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Le({viewMode:a})),e(Ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Be({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ya(e),e(De(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),f=ea(),u=da(f),a=ge(),s=Ce(),t=G(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[B,te]=_.useState(!1),{isFeatureEnabled:L}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>v(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(L?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>J(n)),M=d(n=>K(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(A(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!B&&C==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))},[i,B,C,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":M&&s(X());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&Ae(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=We(he??"")==="reports",be=Je(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Ke({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:L,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ze(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(Y,{path:"/",element:p.jsx(Ca,{})}),p.jsx(Y,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-BLlSTcoD.js";import{F as j,z as w,aN as y,A as I,d as p,f as F,d5 as P,x as T}from"./index-aZImxzjX.js";import"./mui-DcNGd9L2.js";import m from"./NotFoundScreen-Bnx2UPHv.js";import{a as d}from"./sentry-D_xp3E3Q.js";import{u as L,j as b,h as A,g as V,n as R,o as U,p as u}from"./core-CbpoBsNm.js";import{eW as z,Ta as C,Pr as Y,Tb as v,vs as q,fH as G,Tc as H,vq as O}from"./zeni-epic-state-CkeDRiud.js";import{R as x}from"./ReferralListScreen-DPPvxoTI.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";import"./useAskAiCfoHostNavButtonProps-BZImc5qT.js";import"./MobileAppDrawer-CWBhYKqW.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="a11ad164-278f-41ca-9d73-0bd1ce052728",a._sentryDebugIdIdentifier="sentry-dbid-a11ad164-278f-41ca-9d73-0bd1ce052728")}catch{}})();const W=R(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{a(v()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}a(O())},onUpdateInviteFormLocalData:s=>{a(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),B=()=>{const a=L(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=b(o=>z(o)),c=A(),_=V(),{useDynamicConfig:g}=j(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=b(o=>C(o)),k=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:D}=g(y.zeniAccountsConfig),N=Y(D);d.useEffect(()=>{a(v()),r?.rewardsLastViewedTime==null&&i===!1&&(a(q()),s(!0))},[]),d.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),a(G(!0)))},[l.fetchState,a]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[l.fetchState==="Completed"?e.jsx(I,{analytics:p,onLoad:o=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,e.jsx(W,{navigate:c,location:_,currentTenant:r,companyName:S,userName:k,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function ua(){const{useFeatureGate:a}=j(),{isFeatureEnabled:t}=a(T.isReferralFeatureEnabled);return e.jsxs(U,{children:[e.jsx(u,{path:"/",element:t?e.jsx(x,{}):e.jsx(m,{})}),e.jsx(u,{path:"how-it-works",element:t?e.jsx(x,{isReferralDrawerOpen:!0}):e.jsx(m,{})}),e.jsx(u,{path:"refer/*",element:t?e.jsx(B,{}):e.jsx(m,{})}),e.jsx(u,{path:"*",element:e.jsx(m,{})})]})}export{ua as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-Cnv2Os-7.js","assets/sentry-D_xp3E3Q.js","assets/core-CbpoBsNm.js","assets/zeni-epic-state-CkeDRiud.js","assets/index-aZImxzjX.js","assets/mui-DcNGd9L2.js","assets/analytics-CQmVOD4d.js","assets/utils-BQO84dIV.js","assets/withTransactionSidePanel-MinVWpma.js","assets/useAskAiCfoHostNavButtonProps-BZImc5qT.js","assets/TransactionDetailScreen-DdyjxpNe.js","assets/decodeURIComponentSafe-9Mzf3G8U.js","assets/routePaths-DyIc-n3M.js","assets/NotFoundScreen-Bnx2UPHv.js","assets/useInitialThreadRequest-DVxzaQcg.js","assets/analyticsHelper-Bvqx3iRr.js","assets/CompanyPassportScreen-CfrYFFuL.js","assets/MobileAppDrawer-CWBhYKqW.js","assets/useAiCfoDashboardSuggestedQuestionsChips-ClwyrxTK.js","assets/FeaturePreviewScreen-Bbo-4gXG.js","assets/ReferralListScreen-DPPvxoTI.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-D1KmPs-P.js","assets/AddressScreen-CvPxhYFs.js","assets/DomesticWireDetailScreen-DEZpmV1y.js","assets/DrawerScreen-CfPgZFbu.js","assets/SetupPagesScreen-N7NZbMog.js","assets/BusinessVerificationPageScreen-D2N5zUvV.js","assets/BillPayApprovalRoutes-2y_Smb3L.js","assets/ReimbursementApprovalRuleDetailScreen-CcTmDK2L.js","assets/getLocaleForTenant-9euvow3p.js","assets/ReimbursementRoutes-DHjMtvfB.js","assets/ReimbursementApprovalRoutes-BwiPly2p.js","assets/TransactionListRoutes-Y3HUjCX4.js","assets/ZeniAccountStatementScreen-NjdxQEux.js","assets/SettingsRoutes-Bvbg8LVY.js","assets/accountMappingHelper-BfrLGhoG.js","assets/QBOConnectionScreen-BD3gRv9C.js","assets/empty-DhAifQ6-.js","assets/index-D-GsKzyX.js","assets/url-Cn_1-HsX.js","assets/index-Bg6fgf4p.js","assets/ReportsRoutes-B4rkl99K.js","assets/ChargeCardRoutes-YoDH7ylN.js","assets/PeopleRoutes-DwtjCeU9.js","assets/ExpenseAutomationRoutes-UMX9R2ZB.js","assets/TreasuryRoutes-Po66nW-G.js","assets/useCashManagementBanner-BWjfwjGa.js","assets/VendorsRoutes-Bhe46MLu.js","assets/pathToGoBack-C2QnAeVh.js","assets/ZeniAccountRoutes-BVrcLxAX.js","assets/AddressRoutes-ENVkkepY.js","assets/PandLWithForecastRoutes-DzMNbzsJ.js","assets/CustomerOnboardingRoutes-BAxjCtaH.js","assets/TransactionDetailRoutes-9wsPGvQA.js","assets/EntityDetailRoutes-ByNAOdBV.js","assets/NotificationRoutes-Qy8HYHkb.js","assets/PerformanceRoutes-DJjg_nmN.js","assets/RewardsRoutes-CmWH02Nb.js","assets/TaskRoutes-DddYQsp2.js","assets/TaskListScreen-DNjQxRsg.js","assets/AiCfoScreen-DTTgGSqT.js","assets/CardsAiCfoScreen-bhVF9e_F.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as a,bn as ls,eW as cs,fB as ds,fz as ms,fA as us,gi as _s,fo as Es,cU as Ae,cB as ps,fR as As,ct as xs,bE as gs,bq as Is,fW as Ts,v as js,Lz as hs,bt as Us,LA as Rs,bK as Hs,fT as Ds,bJ as bs,bs as fs,cp as ys,LB as Cs,LC as vs,cR as Os,cT as Ps,cS as Fs,cA as Ls,cH as Bs,o4 as xe,fx as ge,gs as ks,f_ as Ie,gp as Te,gq as je,f$ as Vs}from"./zeni-epic-state-CkeDRiud.js";import{j as e}from"./liveblocks-BLlSTcoD.js";import{a as v}from"./sentry-D_xp3E3Q.js";import{u as Ss,h as Ns,i as Ms,g as Zs,j as G,l as he,N as c,o as ws,p as t}from"./core-CbpoBsNm.js";import{m as zs,u as Gs,z as H,F as $s,a as Ws,c as qs,x as L,j as Ys,L as B,D as Ue,t as _,P as Js,d as se,l}from"./index-aZImxzjX.js";import"./mui-DcNGd9L2.js";import{f as Re}from"./analyticsHelper-Bvqx3iRr.js";import{t as Ks}from"./getLocaleForTenant-9euvow3p.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="2365c42e-f2ef-4f27-9a40-7cda21a97e5f",i._sentryDebugIdIdentifier="sentry-dbid-2365c42e-f2ef-4f27-9a40-7cda21a97e5f")}catch{}})();const Qs={dashboard:()=>a(()=>import("./DashboardRoutes-Cnv2Os-7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>a(()=>import("./BillPayRoutes-D1KmPs-P.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-DHjMtvfB.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>a(()=>import("./TransactionListRoutes-Y3HUjCX4.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>a(()=>import("./SettingsRoutes-Bvbg8LVY.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>a(()=>import("./ReportsRoutes-B4rkl99K.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-YoDH7ylN.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21])),people:()=>a(()=>import("./PeopleRoutes-DwtjCeU9.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-UMX9R2ZB.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>a(()=>import("./TreasuryRoutes-Po66nW-G.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,47,19,21])),vendors:()=>a(()=>import("./VendorsRoutes-Bhe46MLu.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,23,13,19,12,49,9,17,25,36,21])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-BVrcLxAX.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,47,13,26,17,15,12,27,19,24,23,9,34,21]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},ea=l(()=>a(()=>import("./ReportsRoutes-B4rkl99K.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),sa=l(()=>a(()=>import("./AddressRoutes-ENVkkepY.js"),__vite__mapDeps([51,1,2,3,23,4,5,6,7,13,21]))),aa=l(()=>a(()=>import("./PeopleRoutes-DwtjCeU9.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),na=l(()=>a(()=>import("./PandLWithForecastRoutes-DzMNbzsJ.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),ta=l(()=>a(()=>import("./CustomerOnboardingRoutes-BAxjCtaH.js"),__vite__mapDeps([53,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),ia=l(()=>a(()=>import("./VendorsRoutes-Bhe46MLu.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,23,13,19,12,49,9,17,25,36,21]))),ra=l(()=>a(()=>import("./TransactionDetailRoutes-9wsPGvQA.js"),__vite__mapDeps([54,1,2,3,13,4,5,6,7,10,9,11,12,21]))),He=l(()=>a(()=>import("./EntityDetailRoutes-ByNAOdBV.js"),__vite__mapDeps([55,1,2,3,4,5,6,7,11,8,9,10,12,21]))),oa=l(()=>a(()=>import("./DashboardRoutes-Cnv2Os-7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),De=l(()=>a(()=>import("./BillPayRoutes-D1KmPs-P.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),la=l(()=>a(()=>import("./SettingsRoutes-Bvbg8LVY.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),be=l(()=>a(()=>import("./ReimbursementRoutes-DHjMtvfB.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),ca=l(()=>a(()=>import("./ZeniAccountRoutes-BVrcLxAX.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,47,13,26,17,15,12,27,19,24,23,9,34,21]))),da=l(()=>a(()=>import("./TreasuryRoutes-Po66nW-G.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,47,19,21]))),ma=l(()=>a(()=>import("./TransactionListRoutes-Y3HUjCX4.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ua=l(()=>a(()=>import("./ChargeCardRoutes-YoDH7ylN.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21]))),_a=l(()=>a(()=>import("./NotificationRoutes-Qy8HYHkb.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,21]))),Ea=l(()=>a(()=>import("./PerformanceRoutes-DJjg_nmN.js"),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,17,21]))),pa=l(()=>a(()=>import("./ExpenseAutomationRoutes-UMX9R2ZB.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),Aa=l(()=>a(()=>import("./RewardsRoutes-CmWH02Nb.js"),__vite__mapDeps([58,1,2,3,4,5,6,7,13,20,9,17,21]))),xa=l(()=>a(()=>import("./TaskRoutes-DddYQsp2.js"),__vite__mapDeps([59,1,2,3,13,4,5,6,7,14,17,60,9,21]))),ga=l(()=>a(()=>import("./AiCfoScreen-DTTgGSqT.js"),__vite__mapDeps([61,1,2,3,4,5,6,7,18,49,21]))),fe=l(()=>a(()=>import("./CardsAiCfoScreen-bhVF9e_F.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,21]))),b=l(()=>a(()=>import("./NotFoundScreen-Bnx2UPHv.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),Ia=l(()=>a(()=>import("./TaskListScreen-DNjQxRsg.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,9,17,21])));function wa({setTenantEmailDomain:i}){const U=Ss(),V=Ns(),{tenantEmailDomain:o}=Ms(),S=zs().mode,{setLoading:y,clearAllLoading:O,clearLoading:Z}=Gs(),f=H.getSignedInUserTenant(o)?.tenantId,j=H.getSignedInUser(),K=ls(j),$=Zs(),[N,Ce]=v.useState(!1),r=G(n=>cs(n)),{useFeatureGate:P}=$s(),w=Ws(),ve=qs(),{isFeatureEnabled:Oe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Pe}=P(L.isExpenseAutomationEnabledV2),Fe=Pe||Oe&&K,{isFeatureEnabled:Le}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Be}=P(L.isTreasuryEnabled),{isFeatureEnabled:ke}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=P(L.isDebitCardFeatureEnabled),h=G(n=>n.tenantState.fetchState),p=G(n=>n.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||h==="Completed"?ds(ne,r):void 0,W=p==="Completed"||h==="Completed"?ms(r):void 0,Ve=p==="Completed"||h==="Completed"?us(r):void 0,Se=ke||ne||!!Ve||!!W||!!u,{isFeatureEnabled:Ne}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=P(L.isAiCfoFileUploadEnabled),q=G(n=>_s(n));if(o!=null){const n=H.getSignedInUserTenant(o);j!=null&&n!=null&&Re(j,r,S)}const z={tenantId:f,userId:j?.userId,sessionId:j?.zeniSessionId},te=Es(),E=Ys(),Me=r.company==null||E?.loggedInUserRoleMap!=null&&Ae(E.loggedInUserRole),Ze=ps(E?.loggedInUserRoleMap),ie=v.useRef(!0),re=he("/:tenantEmailDomain/onboarding/*")!==null,X=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),we=G(n=>z.tenantId!=null?As(n,z.tenantId):void 0);v.useEffect(()=>{y(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(X!=null&&f!=null){const n=X.params.selectedPeriod;if(n!=null){const R=n.split("-");if(R.length===2){const d=xs(Number(R[0])),s=Number(R[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,Ue.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=Is();m.isAfter(M,"month")===!1?U(Ts(f,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[X,f]),v.useEffect(()=>{N||(Ce(!0),y(B.TENANT_FETCHING)),ie.current?ie.current=!1:!js(te,z)&&H.isSignedIn()&&(y(B.TENANT_FETCHING),function(n,R,d,s){if(ge(R?.userId,R?.zeniSessionId,n.tenantId),d(ks(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=H.getSignedInUserTenantWithId(n.tenantId);s&&Ue.updateAppLocaleID(Ks(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?se.identify(n.userId,{tenant_id:n.tenantId}):se.resetUserIdentity()}(z,j,U,we))},[z,te,j,U,H]),v.useEffect(()=>{H.isSignedIn()&&(y(B.TENANT_FETCHING),function(n,R,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&m?.zeniSessionId!=null,is=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,os=d!=null&&d.externalConnections==null;if(Y&&is){k(Ie(s));const J=H.getSignedInUserTenantWithId(s);J?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(m.userId,s)))}else Y&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),Y&&os&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(m.userId,s)));if(Y){se.identify(m.userId,{tenant_id:s});const J=s==null||s!=null&&(R==="Completed"||R==="Error");n==="Completed"||R!=="Not-Started"&&R!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(Vs(m.userId,s,m.zeniSessionId))),J&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(xe(m.userId,m.zeniSessionId)))}}(h,p,r,f,j,y,U))},[f,p]),v.useEffect(()=>{H.isSignedIn()&&h==="Completed"&&q.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(q.tenantsBaseInOrder)),j!=null&&Re(j,r,S,void 0,q.tenantsBaseInOrder))},[q,h,r,j]),v.useEffect(()=>{p==="In-Progress"&&y(B.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(O(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),h!=="Completed"&&h!=="Error"||(h==="Completed"?_.markAllTenantsFetchCompleted():h==="Error"&&_.markAllTenantsFetchFailed())},[p,h,f,N]);const oe=v.useRef(!1);v.useEffect(()=>{!oe.current&&p==="Completed"&&N&&(oe.current=!0,function(n=Xs,R=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Qs[m];M!=null?M().then(()=>ae(()=>d(s+1))).catch(()=>ae(()=>d(s+1))):d(s+1)};ae(()=>d(0))},R)}())},[p,N]);const C=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:ze}=P(L.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,ce=Se&&!C,We=Rs(E?.loggedInUserRoleMap),qe=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,me=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,ue=me&&Hs(E?.loggedInUserRoleMap),_e=Le&&!C,Ye=r.company!=null&&Ds(r.company),Je=Be&&Ye===!0&&!C,Ke=le&&bs(E?.loggedInUserRoleMap),Qe=ce&&fs(E?.loggedInUserRoleMap),Xe=_e&&ys(E?.loggedInUserRoleMap),es=Cs(E?.loggedInUserRoleMap),ss=vs(E?.loggedInUserRoleMap),A=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),g=Fs(E?.loggedInUserRoleMap),I=Ls(E?.loggedInUserRoleMap),T=Bs(E?.loggedInUserRoleMap),Ee=le&&I,pe=me&&T,as=_e&&A,ns=Je&&x,ee=ce&&g,ts=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ze===!0||We===!0||es===!0||ss===!0;return H.isSignedIn()?f==null?h==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(j!=null&&h!=="In-Progress"&&U(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||h==="Completed"?(de===!0||K&&!re)&&qe===!1&&u===!1&&W===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||de!==!1||re||K?N&&r?.userRole&&u!=null&&W!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(ws,{children:e.jsxs(t,{element:e.jsx(Js,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Ta,{isDashboardAccess:F,isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:W})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(oa,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(ea,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ts||F?e.jsx(aa,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(na,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(ta,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||Ge||$e?e.jsx(ra,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(ma,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(He,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:x,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(He,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(Ia,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xa,{})}),e.jsx(t,{path:"address/*",element:Ke||ue||Xe||Qe?e.jsx(sa,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:as?e.jsx(ca,{}):e.jsx(b,{})}),e.jsx(t,{path:"treasury/*",element:ns?e.jsx(da,{}):e.jsx(b,{})}),e.jsx(t,{path:"performance",element:ve?e.jsx(Ea,{}):e.jsx(ye,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:Fe&&C===!1?e.jsx(pa,{}):e.jsx(ye,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_a,{})}),e.jsx(t,{path:"vendors/*",element:Me?e.jsx(ia,{}):e.jsx(b,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(De,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(De,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:pe?e.jsx(be,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:pe?e.jsx(be,{}):e.jsx(D,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Ne?e.jsx(la,{hasAdminLevelAccess:ue}):e.jsx(b,{})}),e.jsx(t,{path:"cards/ask",element:ee&&w?e.jsx(fe,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:ee&&w?e.jsx(fe,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(t,{path:"cards/*",element:ee?e.jsx(ua,{}):e.jsx(b,{})}),e.jsx(t,{path:"rewards/*",element:ze?e.jsx(Aa,{}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo",element:w?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/",element:w?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:w?e.jsx(ga,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(t,{path:"*",element:e.jsx(b,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Ta=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:y,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):y?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:y,tenantEmailDomain:O})=>y===!0||i?e.jsx(Ra,{tenantEmailDomain:O}):S?e.jsx(Ua,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(ja,{tenantEmailDomain:O}):e.jsx(b,{}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ra=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),ye=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wa as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-BLlSTcoD.js";import{a as p}from"./sentry-D_xp3E3Q.js";import{h as V,g as Q,u as T,j as h,s as ce,n as $,i as G,o as X,p as A}from"./core-CbpoBsNm.js";import{bn as we,eW as D,gn as Pe,mV as le,NM as je,hz as me,ND as De,qM as Me,kr as he,mR as Ue,hB as Te,NF as _e,NE as Re,Q2 as Fe,z3 as Be,Eo as Oe,PD as Ve,PM as ze,c7 as ee,cM as Le,cN as Ne,LL as Qe,Q3 as $e,LM as Ge,xv as Ke,Q4 as Ze,GP as He,E4 as qe,DX as fe,DU as Je,xz as be,D_ as Se,E1 as ye,E7 as ne,tZ as te,xy as Xe,k3 as W,k6 as Ce,Q5 as We,l7 as Ye,xO as en,My as nn,Mz as tn,k1 as an,Q6 as on,k4 as sn,re as cn,Q7 as ln,Q8 as rn,ri as dn,hk as un,LU as J,hd as pn,hg as gn,LV as mn,xL as hn,Q9 as fn,Qa as bn,El as Sn,fz as Ie,fB as xe,Qb as yn,gb as Cn,M2 as In,xK as re,gg as de,gf as xn,xJ as En,ge as An,gd as vn,Qc as kn,fE as Ee,Qd as wn,Qe as Pn,xR as jn,xI as ue,Qf as Dn,fV as Mn,xF as Un,b_ as Tn,c6 as _n,c5 as Rn,b$ as Fn,c3 as Bn,c2 as On,c1 as Vn,c4 as zn,c0 as Ln}from"./zeni-epic-state-CkeDRiud.js";import{F as ae,x as R,z as P,af as Ae,bO as Nn,d as q,f as Qn,bz as $n,j as K,B as oe,bP as Gn,bQ as Kn,aq as Zn,h as ve,bR as Hn,bS as qn,bT as Jn,a9 as Xn,X as Wn,bU as Yn,s as et,bV as nt}from"./index-aZImxzjX.js";import{n as F}from"./mui-DcNGd9L2.js";import{M as _}from"./MobileAppDrawer-CWBhYKqW.js";import{a as Z,g as H,m as tt}from"./accountMappingHelper-BfrLGhoG.js";import{t as at,A as ot}from"./AddressScreen-CvPxhYFs.js";import N from"./NotFoundScreen-Bnx2UPHv.js";import{g as st}from"./analyticsHelper-Bvqx3iRr.js";import{B as it}from"./BusinessVerificationPageScreen-D2N5zUvV.js";import{C as ct}from"./CompanyPassportScreen-CfrYFFuL.js";import{q as pe}from"./QBOConnectionScreen-BD3gRv9C.js";import{B as lt}from"./BillPayApprovalRoutes-2y_Smb3L.js";import{R as rt}from"./ReimbursementApprovalRoutes-BwiPly2p.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";import"./routePaths-DyIc-n3M.js";import"./empty-DhAifQ6-.js";import"./pdf-lib-BxiXr152.js";import"./index-D-GsKzyX.js";import"./url-Cn_1-HsX.js";import"./index-Bg6fgf4p.js";import"./decodeURIComponentSafe-9Mzf3G8U.js";import"./ReimbursementApprovalRuleDetailScreen-CcTmDK2L.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]="13695760-94a0-45fd-810c-c23a5966ca66",e._sentryDebugIdIdentifier="sentry-dbid-13695760-94a0-45fd-810c-c23a5966ca66")}catch{}})();const dt=F.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-BLlSTcoD.js";import{h as X,g as Y,u as ee,i as W,j as _,N as j,n as H,t as Ye}from"./core-CbpoBsNm.js";import{bJ as en,cp as Ie,Pr as ye,eW as V,cB as nn,zj as $,z3 as tn,PD as an,PG as sn,rx as ne,rl as te,k$ as ae,tv as L,PI as Ae,gf as $e,ge as Ge,gd as We,PJ as on,zs as cn,E4 as ke,DX as Pe,DU as _e,DL as J,D_ as ve,E1 as Ee,E7 as we,tZ as De,gu as rn,cw as un,fB as dn,fz as ln,fA as pn,bs as mn,PK as yn,CL as le,Dn as fn,PL as gn,bK as Sn,Fn as pe,Eo as bn,PM as hn,PN as Cn,Fr as In,Fv as An,to as kn,JV as Pn,G0 as Ce,H0 as me,PO as _n,PP as vn,PQ as En,PR as He,PS as wn,Mm as Dn,OQ as Tn,Mx as Un,PT as Ke,PU as Ve,Gm as qe,l7 as On,ro as Je,tx as Fn,bE as je,tJ as Re,cz as Vn,PV as Qe,fU as xn,FK as Bn,FO as jn,PW as Rn,G3 as ze,PX as zn,PY as Nn,PZ as Ln,P_ as Mn,gn as Zn,AD as $n,P$ as Gn,AI as Wn,AH as Hn}from"./zeni-epic-state-CkeDRiud.js";import{j as ie,F as se,x as de,m as Te,aN as Q,bz as Xe,z as T,A as oe,d as U,B as Ue,f as G,bA as Kn,at as ce,bB as x,bC as qn,bD as Jn,af as Be,bE as Qn,s as Ne,au as Le,K as Xn,G as Yn,bF as et,bG as nt,bH as tt,a7 as at}from"./index-aZImxzjX.js";import{a as C}from"./sentry-D_xp3E3Q.js";import{n as xe,D as it,S as st}from"./mui-DcNGd9L2.js";import{M as fe}from"./MobileAppDrawer-CWBhYKqW.js";import N from"./NotFoundScreen-Bnx2UPHv.js";import{a as Me}from"./analyticsHelper-Bvqx3iRr.js";import{d as Ze}from"./routePaths-DyIc-n3M.js";import{B as Fe}from"./BusinessVerificationPageScreen-D2N5zUvV.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]="6020a01b-67a1-48de-99f2-4f690f8265da",e._sentryDebugIdIdentifier="sentry-dbid-6020a01b-67a1-48de-99f2-4f690f8265da")}catch{}})();const ot=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as f}from"./liveblocks-BLlSTcoD.js";import{a as u,b as T,q as A}from"./sentry-D_xp3E3Q.js";import{u as D,h as z,j as l,g as F,N as M,n as O}from"./core-CbpoBsNm.js";import{u as j,z as s,m as P,d as w,D as _,e as B,f as N,Y,g as V,E as W,h as v}from"./index-aZImxzjX.js";import{eW as $,Ly as q,Lz as G,fx as H,f_ as J,LE as K,gm as Q,cY as R,LF as b,LG as X,LH as Z,bY as y}from"./zeni-epic-state-CkeDRiud.js";import"./mui-DcNGd9L2.js";import{u as ee}from"./useDeviceId-BX67JldO.js";import{f as te}from"./analyticsHelper-Bvqx3iRr.js";import{t as ne}from"./getLocaleForTenant-9euvow3p.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="e4737afc-5f11-4228-941b-26390192f44b",t._sentryDebugIdIdentifier="sentry-dbid-e4737afc-5f11-4228-941b-26390192f44b")}catch{}})();const ie=O(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(X(n,a)))},clearSignInError:()=>{t(b())}}})(W),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:L,accountLocked:x,accountUnlockTime:E}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),h=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>$(e)),I=l(e=>q(e)),m=F(),k=P().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{L.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[L.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&h!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(G(I.tenantsInOrder),o.zeniSessionId),H(o.userId,o.zeniSessionId,r.tenantId),i(J(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,k,void 0,I.tenantsInOrder),Q().then(()=>{const e=V();e!=null&&B(e)}),setTimeout(()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))},2e3))},[S,p,h,o,r,I,k,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(M,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),x===!0&&E!=null?f.jsx(Y,{onClose:()=>i(b()),unlockDate:E}):null]})}export{ve as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-BLlSTcoD.js";import{a as n}from"./sentry-D_xp3E3Q.js";import{u,g as m,h as g,N as p}from"./core-CbpoBsNm.js";import{z as c,B as b,t as y,d,f as h}from"./index-aZImxzjX.js";import{gr as x,gs as I,LW as w}from"./zeni-epic-state-CkeDRiud.js";import{n as j}from"./mui-DcNGd9L2.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.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]="62c9cbf4-2e4e-419a-9b18-a5d3c63edb46",e._sentryDebugIdIdentifier="sentry-dbid-62c9cbf4-2e4e-419a-9b18-a5d3c63edb46")}catch{}})();function $(){const e=u(),t=m(),i=g(),a=n.useRef(!1),f=c.isSignedIn(),r=t.state?.message==="logout",o=r||f;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{c.clearAll(),e(x()),e(I(!1)),w(),y.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(p,{to:"../",replace:!0})}const v=j.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`;export{$ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-BLlSTcoD.js";import{a as G}from"./sentry-D_xp3E3Q.js";import{h as _,u as v,g as K,j as b,i as z,n as q}from"./core-CbpoBsNm.js";import{z as F,F as W,x as p,_ as H,A as M,d as O,f as V,d8 as Z,s as g,p as Q}from"./index-aZImxzjX.js";import{eW as J,Th as x,IH as C,Ti as R,Td as X,I3 as y,Tj as Y,Ib as E,Hx as aa,II as S,Tk as B,fw as ea,Iy as ta,ID as sa,Iq as oa,Io as w,IE as na,Il as ia,Tl as la,Tm as ra,Tn as ca,To as ka,Tp as T,ei as da,Tq as ua,Tr as pa}from"./zeni-epic-state-CkeDRiud.js";import{n as Ta}from"./mui-DcNGd9L2.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-BZImc5qT.js";import{M as ga}from"./MobileAppDrawer-CWBhYKqW.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.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]="a31d21cd-eca4-4c21-9745-49e18bf1d6f3",e._sentryDebugIdIdentifier="sentry-dbid-a31d21cd-eca4-4c21-9745-49e18bf1d6f3")}catch{}})();const fa=Ta.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,4 +6,4 @@ import{j as u}from"./liveblocks-B6jAIe9x.js";import{a as b}from"./sentry-95bdnR3
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ha=q(function(e,t){const o=x(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,n=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,d=X(e),i=F.isZeniUser();return{taskListView:n,tagListView:d,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}},function(e,t){const{navigate:o,currentTenant:c,location:n,isTaskTemplatesEnabled:d}=t,{tenantEmailDomain:i}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(i,a),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(C(!0,d))},onTabChange:a=>{e(ka(a))},onParentTaskClick:a=>{const s=L(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=I(i,t.localData.defaultTaskGroupId),s=g(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ca({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(C(!0,d))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=Q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(R({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=Da(l,a);e(y({taskDetailLocalData:s}));const k=I(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),f=g(n.state?.pathnameStackToGoBack,n.pathname);o(k,{state:{pathnameStackToGoBack:f,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(sa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(ta(a,s))},onTimeSpentUpdate:(a,s)=>{e(S({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(S({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(E(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(E(a,[s]))},handleNewTaskInitialization:a=>{if(e(y({taskDetailLocalData:{...Y,name:a}})),t.localData.defaultTaskGroupId!=null){const s=I(i,t.localData.defaultTaskGroupId),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}})(Z);function Na(){const e=_(),t=v(),o=K(),c=F.getSignedInUser(),n=
|
|
9
|
+
`,ha=q(function(e,t){const o=x(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,n=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,d=X(e),i=F.isZeniUser();return{taskListView:n,tagListView:d,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}},function(e,t){const{navigate:o,currentTenant:c,location:n,isTaskTemplatesEnabled:d}=t,{tenantEmailDomain:i}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(i,a),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(C(!0,d))},onTabChange:a=>{e(ka(a))},onParentTaskClick:a=>{const s=L(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=I(i,t.localData.defaultTaskGroupId),s=g(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ca({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(C(!0,d))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=Q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(R({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=Da(l,a);e(y({taskDetailLocalData:s}));const k=I(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),f=g(n.state?.pathnameStackToGoBack,n.pathname);o(k,{state:{pathnameStackToGoBack:f,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(sa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(ta(a,s))},onTimeSpentUpdate:(a,s)=>{e(S({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(S({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(E(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(E(a,[s]))},handleNewTaskInitialization:a=>{if(e(y({taskDetailLocalData:{...Y,name:a}})),t.localData.defaultTaskGroupId!=null){const s=I(i,t.localData.defaultTaskGroupId),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}})(Z);function Na(){const e=_(),t=v(),o=K(),c=F.getSignedInUser(),n=b(r=>J(r)),{taskGroupId:d}=z(),{useFeatureGate:i}=W(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:k}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:f}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=i(p.isTaskRecurringParentEnabled),[P,j]=G.useState(!1),h=b(r=>x(r,l)),D=b(r=>r.taskGroupState),m=h.fetchState,{isAiCfoAccessEnabled:$,onAskAiCfoClick:N}=ma({mobileExploreReferrer:"Task Checklist"});if(H({isDataReady:m==="Completed"}),G.useEffect(()=>{t(C(!1,l))},[n?.tenantId,t,l]),G.useEffect(()=>{m==="Completed"&&t(R({taskGroupById:D.taskGroupById}))},[m,D.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return u.jsxs(u.Fragment,{children:[m==="Completed"?u.jsx(M,{analytics:O,onLoad:r=>(U=>U.trackPageLoaded(V.Event.taskListPage))(r)}):null,u.jsxs(fa,{children:[u.jsx(ga,{isAppContentDrawerOpen:P,handleDrawerToggle:r=>{j(r)}}),u.jsx(ha,{location:o,navigate:e,currentTenant:n,taskGroupId:d,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:m,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:f,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:$,onAskAiCfoClick:N})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,I=(e,t)=>`/${e}/tasks/new/${t}`,Da=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...T.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...T.taskDetailLocalData,priority:o}}if(e==="status"){const o=ua(t);return{...T.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...T.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=pa(t);return{...T.taskDetailLocalData,dueDate:o}}return{...T.taskDetailLocalData}};export{Na as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-BLlSTcoD.js";import se from"./NotFoundScreen-Bnx2UPHv.js";import{a as c}from"./sentry-D_xp3E3Q.js";import{h as q,u as O,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-CbpoBsNm.js";import{HK as Z,HN as le,HH as de,eW as M,Td as K,H$ as Q,HE as pe,Iv as ue,Io as ke,Te as W,Tf as N,HA as me,Hx as fe,rx as ge,rl as he,k$ as Se,HV as Ie,Tg as Te,Ia as be,I7 as Ee,HQ as Ce,I4 as Ge,I3 as xe}from"./zeni-epic-state-CkeDRiud.js";import{z as G,d6 as De,w as ye,F as je,x as b,p as X,s as v,A as we,d as A,f as ve,d7 as Re,h as V,at as Fe}from"./index-aZImxzjX.js";import{n as Be}from"./mui-DcNGd9L2.js";import{u as Pe}from"./useInitialThreadRequest-DVxzaQcg.js";import{M as Ue}from"./MobileAppDrawer-CWBhYKqW.js";import Le from"./TaskListScreen-DNjQxRsg.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";import"./useAskAiCfoHostNavButtonProps-BZImc5qT.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]="41054d51-228e-4e14-97df-723776dd0c8b",e._sentryDebugIdIdentifier="sentry-dbid-41054d51-228e-4e14-97df-723776dd0c8b")}catch{}})();function He(){const e=q(),t=O(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(Z())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(De,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let z,_=[];const $e=re(function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=M(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=G.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=K(e),{tenantEmailDomain:x}=d,E=r.recurringSourceTaskId,D=E!=null?`${V.appUrl}/${x}/tasks/${encodeURIComponent(E)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:G.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==z&&(z=I,_=Object.values(I)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${V.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(xe({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=X(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(Q(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(Re);function w(){const e=q(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>M(i)),k=Pe(l?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:x}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[D,I]=c.useState(!1),[p,Y]=c.useState(!1),[F,J]=c.useState(!1),[B,ee]=c.useState(!1),[P,y]=c.useState(!1),T=c.useRef(!1),C=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>K(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(Y(!0),t(Q(!1,r)))},[p,t]),c.useEffect(()=>{F||U.fetchState==="Completed"||(J(!0),t(pe()))},[F,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))},[t,r]);c.useEffect(()=>{if(P)if(C!=="In-Progress"){if(T.current){if(C==="Error")return y(!1),void(T.current=!1);if(C==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,C,l,s,e]);const H=g(i=>W(i,r)),j=H.fetchState,$=G.getSignedInUser();if($==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&H.error?.code===400){const{tenantEmailDomain:i}=l,m=R(i),te=v(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(we,{analytics:A,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:D,handleDrawerToggle:i=>{I(i)}}),n.jsx($e,{analytics:A,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:$,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:x,isTaskGroupAssigneesEnabled:E})]})]})}const Ne=Be.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{TransactionDetailRoutes-BX1iNIyW.js → TransactionDetailRoutes-9wsPGvQA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-BLlSTcoD.js";import i from"./NotFoundScreen-Bnx2UPHv.js";import{T as r}from"./TransactionDetailScreen-DdyjxpNe.js";import"./sentry-D_xp3E3Q.js";import{o as a,p as o}from"./core-CbpoBsNm.js";import"./zeni-epic-state-CkeDRiud.js";import"./recharts-C0aThBg3.js";import"./index-aZImxzjX.js";import"./mui-DcNGd9L2.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";import"./useAskAiCfoHostNavButtonProps-BZImc5qT.js";import"./decodeURIComponentSafe-9Mzf3G8U.js";import"./routePaths-DyIc-n3M.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="56b6774e-1a6b-43e6-92ce-ea2969956395",e._sentryDebugIdIdentifier="sentry-dbid-56b6774e-1a6b-43e6-92ce-ea2969956395")}catch{}})();function k(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
|