@zeniai/web-app-ui 5.0.55-dev → 5.0.56-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-T4qftw_1.js +1 -0
- package/dist/assets/AddressScreen-BklJKutc.js +9 -0
- package/dist/assets/{AiCfoScreen-bBUSfHWB.js → AiCfoScreen-B4xK4s4e.js} +3 -3
- package/dist/assets/{BillPayApprovalRoutes-2hXuGhl9.js → BillPayApprovalRoutes-SfFy4Q3x.js} +1 -1
- package/dist/assets/{BillPayRoutes-zS41FDXZ.js → BillPayRoutes-C_kzPWNw.js} +4 -4
- package/dist/assets/{BusinessVerificationPageScreen-Ct3skeMe.js → BusinessVerificationPageScreen-DgymQkoP.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-CuAdoqYf.js → ChargeCardRoutes-DKy3Qza2.js} +8 -8
- package/dist/assets/CompanyPassportScreen-Q42ItsTK.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-p0yF5-7Y.js → ConnectionAuthScreen-DWjSQZql.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CTfinB3p.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CpFbCHUf.js → CustomerOnboardingRoutes-BeIEf537.js} +4 -4
- package/dist/assets/{DashboardRoutes-DDAZzkgF.js → DashboardRoutes-DmT1zvbt.js} +3 -3
- package/dist/assets/{DefaultTenantHome-ChgUq64m.js → DefaultTenantHome-CkOir1h_.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-ByrLTF-k.js → DomesticWireDetailScreen-Ba2RcbCG.js} +3 -3
- package/dist/assets/DrawerScreen-GbmWLeG7.js +1 -0
- package/dist/assets/{EntityDetailRoutes-QqB5pqCq.js → EntityDetailRoutes-EYGmcLTc.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CL2KITKF.js → ExpenseAutomationRoutes-CO8PFCnO.js} +4 -4
- package/dist/assets/FeaturePreviewScreen-BbZ1xf4z.js +1 -0
- package/dist/assets/{MagicLinkRoutes-CBolYQjL.js → MagicLinkRoutes-CohCNxyX.js} +18 -18
- package/dist/assets/MagicLinkSignInScreen-B2CB3dkp.js +12 -0
- package/dist/assets/{MobileAppDrawer-BeJ-If8M.js → MobileAppDrawer-n8t03yaO.js} +1 -1
- package/dist/assets/NotFoundScreen-DpPEAqIa.js +1 -0
- package/dist/assets/{NotificationRoutes-B1POEpf-.js → NotificationRoutes-TwQiwNf3.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-mNWJpjrX.js → PandLWithForecastRoutes-Wtfusoui.js} +1 -1
- package/dist/assets/{PeopleRoutes-Du_86K0g.js → PeopleRoutes-7E-ffjBJ.js} +5 -5
- package/dist/assets/PerformanceRoutes-CHrolr76.js +1 -0
- package/dist/assets/{Preview-CPDm5N-k.js → Preview-CktKjgWY.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BhcOl23Z.js → QBOConnectionScreen-DyznN-F2.js} +1 -1
- package/dist/assets/{ReferralListScreen-DEbwuGTl.js → ReferralListScreen-Dy8iQFPt.js} +2 -2
- package/dist/assets/{ReimbursementApprovalRoutes-BkkSOVv_.js → ReimbursementApprovalRoutes-BbOdeAtw.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BcGzbUnN.js → ReimbursementApprovalRuleDetailScreen-DuDkeiAm.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-CEjpsr8X.js → ReimbursementRoutes-BOMyJgrz.js} +4 -4
- package/dist/assets/{ReportsRoutes-UBnZ8bDz.js → ReportsRoutes-BSTB7uRz.js} +1 -1
- package/dist/assets/RewardsRoutes-vMUR4VOs.js +1 -0
- package/dist/assets/{ScreenRoutes-DtZbWTGl.js → ScreenRoutes-D4dqaFnm.js} +2 -2
- package/dist/assets/{SettingsRoutes-DCgs4OLl.js → SettingsRoutes-r9Ej5ZGq.js} +4 -4
- package/dist/assets/{SetupPagesScreen-BsOpxM3t.js → SetupPagesScreen-BaBZaUCN.js} +1 -1
- package/dist/assets/{SignInScreen-CY67jsy0.js → SignInScreen-Nl88Hc6C.js} +1 -1
- package/dist/assets/{SignOutScreen-5lq_Evk4.js → SignOutScreen-D4lUsOmx.js} +1 -1
- package/dist/assets/{TaskListScreen-DFdZjWgl.js → TaskListScreen-Bvnm9IXP.js} +2 -2
- package/dist/assets/{TaskRoutes-D1q4DIf6.js → TaskRoutes-BAXcXFEg.js} +2 -2
- package/dist/assets/TransactionDetailRoutes-DLz2n5Pp.js +1 -0
- package/dist/assets/{TransactionDetailScreen-uOgH9UNp.js → TransactionDetailScreen-BARgRHWT.js} +2 -2
- package/dist/assets/{TransactionListRoutes-BQchWm8T.js → TransactionListRoutes-FB1Nag0X.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BtpbVTG-.js → TreasuryRoutes-D09j5H5F.js} +5 -5
- package/dist/assets/{VendorsRoutes-DZy6VVP0.js → VendorsRoutes-CMOWuwxW.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-BburOEIH.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CQIW5-uh.js → ZeniAccountRoutes-CvMBgZsl.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-CqjHqKdC.js +9 -0
- package/dist/assets/{accountMappingHelper-CQSFsM6N.js → accountMappingHelper-BOSY12FJ.js} +1 -1
- package/dist/assets/{analytics-ByrfXPqG.js → analytics-CcGmsyc8.js} +1 -1
- package/dist/assets/{analyticsHelper-BZYQYc1O.js → analyticsHelper-DJMvFBQ1.js} +1 -1
- package/dist/assets/{core-DcM32IW_.js → core-DkPdadc6.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-mAxyJdJ8.js → decodeURIComponentSafe-h3wJzOm1.js} +1 -1
- package/dist/assets/{dnd-36WXho_9.js → dnd-D-YvLFfj.js} +1 -1
- package/dist/assets/{empty-GSTAUqhH.js → empty-C7PzWdR6.js} +1 -1
- package/dist/assets/{empty-lHXrwReA.js → empty-ohi5JxHm.js} +1 -1
- package/dist/assets/{emptyVideoElement-Bsa6If51.js → emptyVideoElement-B09QwhYv.js} +1 -1
- package/dist/assets/epic-DC-PDk7m.js +2 -0
- package/dist/assets/getLocaleForTenant-FjCgXmXO.js +1 -0
- package/dist/assets/{index-Bw9qJkeB.js → index-8VSOxL6k.js} +1 -1
- package/dist/assets/{index-CR2DVZE0.js → index-BIUa1dNl.js} +2 -2
- package/dist/assets/{index-Dq0r4E9j.js → index-BVoPsTXN.js} +1 -1
- package/dist/assets/{index-DSBNuTzQ.js → index-CpD5ML2i.js} +12483 -12422
- package/dist/assets/{index-p7Us2Fcf.js → index-CxVN3Ojx.js} +1 -1
- package/dist/assets/{index-DTGcnfLC.js → index-DHz0Faq_.js} +1 -1
- package/dist/assets/{index-CjaQ8-D2.js → index-ufE2I9Jb.js} +1 -1
- package/dist/assets/{lexical-CYAYrhLa.js → lexical-Sc7rk4Y7.js} +1 -1
- package/dist/assets/{liveblocks-BeS4QmMp.js → liveblocks-tcXs1fes.js} +1 -1
- package/dist/assets/{lottie-Bdncx-qB.js → lottie-CwApzZxI.js} +1 -1
- package/dist/assets/{mui--qrGbwFJ.js → mui-DbdGpDJj.js} +1 -1
- package/dist/assets/{pathToGoBack-Cn4t6MOa.js → pathToGoBack-D9y2NyzP.js} +1 -1
- package/dist/assets/{pdf-6nmWWkz8.js → pdf-DG2fyOfp.js} +4 -4
- package/dist/assets/{pdf-lib-rQgtUIvp.js → pdf-lib-fmjHY_Su.js} +1 -1
- package/dist/assets/{plaid-BZ0BFqP0.js → plaid-UeHpA8su.js} +1 -1
- package/dist/assets/{pusher-4QLniNXV.js → pusher-CH-5kFcN.js} +1 -1
- package/dist/assets/{react-DKUlDjBa.js → react-BTMxDr8F.js} +1 -1
- package/dist/assets/{react-DCTwOcr5.js → react-CAp_bFar.js} +1 -1
- package/dist/assets/{react-BszWSDWQ.js → react-CFEMacjg.js} +1 -1
- package/dist/assets/{react-BOWjwOm8.js → react-CjW2GUTT.js} +1 -1
- package/dist/assets/{react-C3zOniDH.js → react-D3qpynvt.js} +1 -1
- package/dist/assets/{react-BFaux__7.js → react-P8ikJhK3.js} +1 -1
- package/dist/assets/{recharts-DoWl4vaN.js → recharts-D0a4NFa9.js} +1 -1
- package/dist/assets/{routePaths-Dr0mF--c.js → routePaths-D7wc65Bl.js} +1 -1
- package/dist/assets/{sentry-BlmJH5WH.js → sentry-DNuKG-9f.js} +1 -1
- package/dist/assets/{url-BG92tf7R.js → url-Bxb4Dr7g.js} +1 -1
- package/dist/assets/{url-AJ2wpRsW.js → url-EFuL_PC5.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BtZXhZ4f.js +1 -0
- package/dist/assets/{useDeviceId-DaD3aMiS.js → useDeviceId-DoEHbao8.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-Bhmav9DR.js +1 -0
- package/dist/assets/{useInitialThreadRequest-82Lo2xWZ.js → useInitialThreadRequest-DId3URPK.js} +1 -1
- package/dist/assets/{utils-RmRP6xA4.js → utils-BmJyX3cx.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-ClKqbF5a.js → withTransactionSidePanel-CzkV98Uv.js} +1 -1
- package/dist/assets/{zeni-epic-state-ChnjRetZ.js → zeni-epic-state-CSoWjbAn.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-DNt7Duo0.js +0 -1
- package/dist/assets/AddressScreen-he1e1kGg.js +0 -9
- package/dist/assets/CompanyPassportScreen-DOP3-8BK.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-VyI92nJg.js +0 -1
- package/dist/assets/DrawerScreen-CRCi_azE.js +0 -1
- package/dist/assets/FeaturePreviewScreen-PkNswvQo.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-D6iPjuvI.js +0 -12
- package/dist/assets/NotFoundScreen-BQueQzhs.js +0 -1
- package/dist/assets/PerformanceRoutes-CX1dBnw2.js +0 -1
- package/dist/assets/RewardsRoutes-q5pGdj79.js +0 -1
- package/dist/assets/TransactionDetailRoutes-D9aq9a6c.js +0 -1
- package/dist/assets/WiseConfirmationScreen-DvTv7iw3.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-DfMsxUlV.js +0 -9
- package/dist/assets/epic-DhZTt5cl.js +0 -2
- package/dist/assets/getLocaleForTenant-h7G676lL.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DDxvherx.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-SU-quGCv.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-tcXs1fes.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DNuKG-9f.js";import{L as dt,bR as Tc,eN as Ac,Ii as Rc,I_ as kl,c0 as Tl,fh as Al,fi as Rl}from"./zeni-epic-state-CSoWjbAn.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,n as Yt,o as ue,p as Dl}from"./utils-BmJyX3cx.js";import{r as un}from"./empty-C7PzWdR6.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-fmjHY_Su.js";import{r as Gl}from"./index-BVoPsTXN.js";import{r as zl}from"./index-ufE2I9Jb.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-DkPdadc6.js";import{u as Kl,z as Pc,L as Wl,V as Jl,W as Xl,i as Ql,d as tf}from"./index-CpD5ML2i.js";import"./mui-DbdGpDJj.js";import{d as Pe}from"./decodeURIComponentSafe-h3wJzOm1.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]="1c0716ea-aaec-418c-8c75-ef2b770584b9",t._sentryDebugIdIdentifier="sentry-dbid-1c0716ea-aaec-418c-8c75-ef2b770584b9")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-tcXs1fes.js";import{a as o}from"./sentry-DNuKG-9f.js";import{g as f,j as N,h as V,u as W,k as F}from"./core-DkPdadc6.js";import{h as _,q as z,z as R,b3 as U,E as $,Q as q,M as Q,x as X,d as l,f as Z,a2 as G,b4 as J}from"./index-CpD5ML2i.js";import{eX as K,eN as Y,Lx as I,Ly as ee,tr as re,th as g,eZ as ae,bM as ne,tm as te,Lz as se}from"./zeni-epic-state-CSoWjbAn.js";import{D as oe,e as ie,n as le,S as de}from"./mui-DbdGpDJj.js";import{u as ce}from"./useAskAiCfoHostNavButtonProps-BtZXhZ4f.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-Bhmav9DR.js";import{M as ue}from"./MobileAppDrawer-n8t03yaO.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]="105b4187-de03-47eb-9ca7-981b48742f9c",e._sentryDebugIdIdentifier="sentry-dbid-105b4187-de03-47eb-9ca7-981b48742f9c")}catch{}})();const pe={overlayWidth:new $(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=_(),n=z();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>K(d));return s.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(ie,{in:e,direction:"left",children:s.jsx(ge,{onClick:d=>d.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(de)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,P="refer-and-earn-status-update",ke=
|
|
5
|
+
`,P="refer-and-earn-status-update",ke=F(function(e){const r=I(e),a=e.referralViewState.rewardsPlanFetchState,n=ne([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(se({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(te(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(G(J));function Pe({isReferralDrawerOpen:e}){const r=N(),a=V(),n=W(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,A]=o.useState(!1),[k,C]=o.useState(!1),p=R.getSignedInUser(),h=f(t=>Y(t)),m=f(t=>I(t)),b=m.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),y=ee([m,w]),{areTenantIdsInSync:c}=q();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(a(re()),A(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),a(g(!0)))},[b,a,c]),o.useEffect(()=>{!d&&w.fetchState==="Not-Started"&&c&&(x(!0),a(ae(!0)))},[w,a,c]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[E,j]=o.useState(!1),v=t=>{j(t)},{isAiCfoOpen:O,setIsAiCfoOpen:L}=Q(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=ce({isAiCfoOpen:O,setIsAiCfoOpen:L,mobileExploreReferrer:"Rewards"});fe({isDataReady:y===!0});const M={events:p?.userId!=null?[`private-${p.userId}.${P}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(X,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(Z.Event.rewardsPageViewed)})(t)}):null,s.jsx(ue,{isAppContentDrawerOpen:E,handleDrawerToggle:v}),k===!0?s.jsx(we,{closeDrawerHandler:()=>{C(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(ke,{location:n,navigate:r,currentTenant:h,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...M})]})}export{Pe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-tcXs1fes.js";import R from"./NotFoundScreen-DpPEAqIa.js";import{a as p}from"./sentry-DNuKG-9f.js";import{j as C,u as I,h as A,g as u,N as E,k,n as D,o as m}from"./core-DkPdadc6.js";import{eN as T,Mr as g,MH as S,Co as V,Bx as U,Cn as d,Ce as _,MW as B}from"./zeni-epic-state-CSoWjbAn.js";import{h as M,z as N,B as W,a2 as $,bJ as O,ab as z}from"./index-CpD5ML2i.js";import"./mui-DbdGpDJj.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-DuDkeiAm.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]="062bf074-137b-45ad-9466-3be3d0464901",e._sentryDebugIdIdentifier="sentry-dbid-062bf074-137b-45ad-9466-3be3d0464901")}catch{}})();const c="reimbursement-approval-rule-update",H=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(c)&&e(B(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(_(s))},onEditRuleClick:s=>{s!=null?(e(d(s)),a(`./${s}/edit`)):(e(d()),a("./new"))}}})($(O)),J=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=M(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(U(!0)))},[l,b,a]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(d())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${c}`]:[],eventCallback:(n,P,x)=>{n.endsWith(c)&&x.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(W,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(H,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(m,{path:"/",element:t.jsx(J,{})}),t.jsx(m,{path:"/new",element:t.jsx(v,{})}),t.jsx(m,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(m,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-tcXs1fes.js";import{a as y}from"./sentry-DNuKG-9f.js";import{j as A,h as w,u as C,l as T,g as b,k as U}from"./core-DkPdadc6.js";import{MH as R,Mr as E,Ch as x,Cq as _,Co as h,Cp as S,MI as B}from"./zeni-epic-state-CSoWjbAn.js";import{z as k,h as V,B as j,bA as F,ab as O}from"./index-CpD5ML2i.js";import"./mui-DbdGpDJj.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="45689b19-8831-4b3e-a594-55a3d94fe9fb",e._sentryDebugIdIdentifier="sentry-dbid-45689b19-8831-4b3e-a594-55a3d94fe9fb")}catch{}})();function $(e){return B(e)==null}const M=U(function(e,a){const t=R(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const v=[];return p.forEach(c=>{const D=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const m=!!$(d.value);return{type:m?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!m}}),f=D.concat(I);v.push({action:c.stepType.selectedOption,actors:f,operator:f.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(S(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(S(p))}},onResetClick:()=>{e(h()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(h()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function G(){const e=A(),a=w(),t=C(),{approvalRuleId:s}=T(),n=k.getSignedInUser(),l=V(),r=b(p=>R(p)),i=b(p=>E(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(j,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{G as R,$ as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BeS4QmMp.js";import{j as J,h as me,u as W,l as X,g as B,N as O,k as K,i as ut,n as pt,o as E}from"./core-DcM32IW_.js";import{eN as q,MX as ce,c0 as de,Bs as je,jB as bt,BF as se,BE as ie,MY as gt,bn as ue,fH as Fe,MZ as ht,Jj as ft,jq as Ue,Jk as Ae,Jl as St,ik as It,Md as yt,iA as At,Bg as Rt,s5 as Ct,is as kt,C0 as Le,M_ as Ne,M$ as vt,N0 as Et,N1 as Bt,N2 as wt,N3 as xt,BM as Re,iG as Tt,Mm as Dt,BG as jt,Bq as Ft,N4 as Ut,Bp as Lt,N5 as Nt,By as Ce,BQ as Mt,BP as Pt,BL as $t,N6 as Me,GD as Ot,bo as _t,BB as Gt,Ci as zt,N7 as Ht,N8 as Zt,BY as Vt,BV as ke,LI as Wt,Bn as qt,N9 as Pe,CH as ve,CP as Jt,Na as Kt,Nb as Z,Nc as Yt,Nd as $e,Ne as Qt,Nf as Oe,Ng as _e,C8 as oe,bt as Xt,bE as pe,cA as be,eT as Ge,eR as ze,Nh as en,gC as tn,LV as nn,Ni as an,Nj as He,LZ as sn,MH as on,Nk as rn,MW as ln,CM as Ee,CL as mn,Nl as cn,Nm as dn,Nn as un,No as pn,Np as bn,Ms as gn,CC as hn,CG as fn,bv as Sn,bD as In,cv as yn,cj as An,bs as Rn,Ik as Cn,cL as kn,cN as vn,cM as En,cu as Bn}from"./zeni-epic-state-ChnjRetZ.js";import{y as Ze,q as Ve,a as ee,p as k,M as ge,z as P,bK as We,C as te,d as v,aD as Be,o as F,ap as Q,H as wn,D as qe,bL as xn,v as V,bM as Tn,k as ne,bN as Dn,N as jn,F as Fn,B as he,f as Je,a2 as Un,bb as Ln,R as Nn,h as Ke,bO as Mn,a5 as Pn}from"./index-DSBNuTzQ.js";import{n as _,S as $n}from"./mui--qrGbwFJ.js";import re from"./NotFoundScreen-BQueQzhs.js";import{S as we}from"./SetupPagesScreen-BsOpxM3t.js";import{F as Ye}from"./FeaturePreviewScreen-PkNswvQo.js";import{a as h}from"./sentry-BlmJH5WH.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-DDxvherx.js";import{u as Qe}from"./useInitialThreadRequest-82Lo2xWZ.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-SU-quGCv.js";import{D as On}from"./DrawerScreen-CRCi_azE.js";import{M as et}from"./MobileAppDrawer-BeJ-If8M.js";import{R as _n}from"./ReimbursementApprovalRoutes-BkkSOVv_.js";import{FallBackRoute as Gn}from"./ScreenRoutes-DtZbWTGl.js";import"./recharts-DoWl4vaN.js";import"./analytics-ByrfXPqG.js";import"./plaid-BZ0BFqP0.js";import"./dnd-36WXho_9.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bdncx-qB.js";import"./lexical-CYAYrhLa.js";import"./pdf-6nmWWkz8.js";import"./utils-RmRP6xA4.js";import"./analyticsHelper-BZYQYc1O.js";import"./routePaths-Dr0mF--c.js";import"./BusinessVerificationPageScreen-Ct3skeMe.js";import"./ReimbursementApprovalRuleDetailScreen-BcGzbUnN.js";import"./getLocaleForTenant-h7G676lL.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]="5dd5c107-3966-43ff-9a5a-3f59aefa1fd3",e._sentryDebugIdIdentifier="sentry-dbid-5dd5c107-3966-43ff-9a5a-3f59aefa1fd3")}catch{}})();const tt=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=qe.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=ue(c),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),u=ht(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,I=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,I=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,A=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:A},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:u.bankAccountCreationState,bankAccounts:u.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:I,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,u)=>{i!=null&&e(ie(i,l,u,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ce(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Mt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ce(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Nt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,u)=>{e(Ut({reimbursementId:u,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,u)=>{e(Ft({reimbursementId:u,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(jt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Re(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Dt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Re("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Ne()),e(vt());const i=tt(o),l=V(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(kt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Ct("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(At(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}})(xn);function xe(){const e=J(),t=me(),n=W(),{reimbursementId:r}=X(),c=Ze(),d=Ve(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isReimbursementCommentingEnabled),{isAiCfoOpen:x,setIsAiCfoOpen:A}=ge(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:p}=fe({isAiCfoOpen:x,setIsAiCfoOpen:A,mobileExploreReferrer:"Reimbursement Details"}),C=W().pathname,j=C.includes("edit"),N=C.includes("reimbursement/new"),[G,D]=h.useState(!1),w=P.getSignedInUser(),S=B(g=>q(g)),b=B(g=>ce(g,r)),M=Qe(S?.companyId,{clearParams:b.fetchState==="Completed"}),U=de(S?.userRole??[]);h.useEffect(()=>{(N&&!G||j&&b.fetchState!="Completed"&&b.fetchState!="In-Progress")&&(D(!0),t(je(!1,u,y,r)))});const $=B(g=>bt(g.accountState,g.accountListState,"reimbursementAccountList"));if(w==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return b.isDeleted===!0||b.billStage=="paid"||b.billStage=="scheduled"||b.fetchState=="Not-Started"||U&&b.billStatus==="rejected"||U===!1&&b.billStage==="pending_approval"&&b.billStatus!=="rejected"?s.jsx(O,{to:R}):b.deleteStatus.fetchState==="In-Progress"||b.fetchState!=="Completed"?s.jsx(We,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:v,onLoad:g=>(ae=>{r!=null&&b.deleteStatus.fetchState!=="Completed"&&ae.trackReimbursementEditReimbursement(r)})(g)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(qn,{children:[s.jsx(Jn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.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(Kn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:M??void 0,isReimbursementCommentingEnabled:I,location:n,navigate:e,currentTenant:S,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:p})})]})}const Zn=_.div`
|
|
1
|
+
import{j as s}from"./liveblocks-tcXs1fes.js";import{j as J,h as me,u as W,l as X,g as B,N as O,k as K,i as ut,n as pt,o as E}from"./core-DkPdadc6.js";import{eN as q,MX as ce,c0 as de,Bs as De,jB as bt,BF as se,BE as ie,MY as gt,bn as ue,fH as Fe,MZ as ht,Jj as ft,jq as Ue,Jk as Ae,Jl as St,ik as It,Md as yt,iA as At,Bg as Rt,s5 as Ct,is as kt,C0 as Le,M_ as Ne,M$ as vt,N0 as Et,N1 as Bt,N2 as wt,N3 as xt,BM as Re,iG as Tt,Mm as jt,BG as Dt,Bq as Ft,N4 as Ut,Bp as Lt,N5 as Nt,By as Ce,BQ as Mt,BP as Pt,BL as $t,N6 as Me,GD as Ot,bo as _t,BB as Gt,Ci as zt,N7 as Ht,N8 as Zt,BY as Vt,BV as ke,LI as Wt,Bn as qt,N9 as Pe,CH as ve,CP as Jt,Na as Kt,Nb as Z,Nc as Qt,Nd as $e,Ne as Yt,Nf as Oe,Ng as _e,C8 as oe,bt as Xt,bE as pe,cA as be,eT as Ge,eR as ze,Nh as en,gC as tn,LV as nn,Ni as an,Nj as He,LZ as sn,MH as on,Nk as rn,MW as ln,CM as Ee,CL as mn,Nl as cn,Nm as dn,Nn as un,No as pn,Np as bn,Ms as gn,CC as hn,CG as fn,bv as Sn,bD as In,cv as yn,cj as An,bs as Rn,Ik as Cn,cL as kn,cN as vn,cM as En,cu as Bn}from"./zeni-epic-state-CSoWjbAn.js";import{$ as Ze,q as Ve,a as ee,p as k,M as ge,z as P,bK as We,x as te,d as v,aD as Be,o as F,ap as Y,G as wn,D as qe,bL as xn,r as V,bM as Tn,j as ne,bN as jn,Q as Dn,E as Fn,B as he,f as Je,a2 as Un,bb as Ln,U as Nn,h as Ke,bO as Mn,a5 as Pn}from"./index-CpD5ML2i.js";import{n as _,S as $n}from"./mui-DbdGpDJj.js";import re from"./NotFoundScreen-DpPEAqIa.js";import{S as we}from"./SetupPagesScreen-BaBZaUCN.js";import{F as Qe}from"./FeaturePreviewScreen-BbZ1xf4z.js";import{a as h}from"./sentry-DNuKG-9f.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-BtZXhZ4f.js";import{u as Ye}from"./useInitialThreadRequest-DId3URPK.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-Bhmav9DR.js";import{D as On}from"./DrawerScreen-GbmWLeG7.js";import{M as et}from"./MobileAppDrawer-n8t03yaO.js";import{R as _n}from"./ReimbursementApprovalRoutes-BbOdeAtw.js";import{FallBackRoute as Gn}from"./ScreenRoutes-D4dqaFnm.js";import"./recharts-D0a4NFa9.js";import"./analytics-CcGmsyc8.js";import"./plaid-UeHpA8su.js";import"./dnd-D-YvLFfj.js";import"./stripe-DMRn4zHo.js";import"./lottie-CwApzZxI.js";import"./lexical-Sc7rk4Y7.js";import"./pdf-DG2fyOfp.js";import"./utils-BmJyX3cx.js";import"./analyticsHelper-DJMvFBQ1.js";import"./routePaths-D7wc65Bl.js";import"./BusinessVerificationPageScreen-DgymQkoP.js";import"./ReimbursementApprovalRuleDetailScreen-DuDkeiAm.js";import"./getLocaleForTenant-FjCgXmXO.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]="55765093-07ec-4249-829e-c4cd510f9b05",e._sentryDebugIdIdentifier="sentry-dbid-55765093-07ec-4249-829e-c4cd510f9b05")}catch{}})();const tt=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=qe.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=ue(c),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),u=ht(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,I=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,I=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,A=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:A},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:u.bankAccountCreationState,bankAccounts:u.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:I,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,u)=>{i!=null&&e(ie(i,l,u,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ce(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Mt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ce(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Nt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,u)=>{e(Ut({reimbursementId:u,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,u)=>{e(Ft({reimbursementId:u,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Re(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Re("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Ne()),e(vt());const i=tt(o),l=V(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(kt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Ct("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(At(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}})(xn);function xe(){const e=J(),t=me(),n=W(),{reimbursementId:r}=X(),c=Ze(),d=Ve(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isReimbursementCommentingEnabled),{isAiCfoOpen:x,setIsAiCfoOpen:A}=ge(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:p}=fe({isAiCfoOpen:x,setIsAiCfoOpen:A,mobileExploreReferrer:"Reimbursement Details"}),C=W().pathname,D=C.includes("edit"),N=C.includes("reimbursement/new"),[G,j]=h.useState(!1),w=P.getSignedInUser(),S=B(g=>q(g)),b=B(g=>ce(g,r)),M=Ye(S?.companyId,{clearParams:b.fetchState==="Completed"}),U=de(S?.userRole??[]);h.useEffect(()=>{(N&&!G||D&&b.fetchState!="Completed"&&b.fetchState!="In-Progress")&&(j(!0),t(De(!1,u,y,r)))});const $=B(g=>bt(g.accountState,g.accountListState,"reimbursementAccountList"));if(w==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return b.isDeleted===!0||b.billStage=="paid"||b.billStage=="scheduled"||b.fetchState=="Not-Started"||U&&b.billStatus==="rejected"||U===!1&&b.billStage==="pending_approval"&&b.billStatus!=="rejected"?s.jsx(O,{to:R}):b.deleteStatus.fetchState==="In-Progress"||b.fetchState!=="Completed"?s.jsx(We,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:v,onLoad:g=>(ae=>{r!=null&&b.deleteStatus.fetchState!=="Completed"&&ae.trackReimbursementEditReimbursement(r)})(g)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(qn,{children:[s.jsx(Jn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.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(Kn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:M??void 0,isReimbursementCommentingEnabled:I,location:n,navigate:e,currentTenant:S,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:p})})]})}const Zn=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -53,7 +53,7 @@ import{j as s}from"./liveblocks-BeS4QmMp.js";import{j as J,h as me,u as W,l as X
|
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,
|
|
56
|
+
`,Qn=K(function(e,t){const n=Me(e,t.reimbursementId),r=P.getSignedInUser(),c=ue(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ht(n.remiActivities,Zt(t.currentTenant),r));const i=de(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Ne());const a=tt(o),i=V(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(qt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Wt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(ke(n,a.type,"")):e(ke(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=V(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(Le(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Vt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(Tn);function Yn(){const e=J(),t=me(),n=W(),r=n.hash.substring(1),c=Ze(),{reimbursementId:d}=X(),m=P.getSignedInUser(),o=B(R=>q(R)),a=B(R=>Me(R,d??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=Ye(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoOpen:u,setIsAiCfoOpen:y}=ge(),{isAiCfoAccessEnabled:I,onAskAiCfoClick:x}=fe({isAiCfoOpen:u,setIsAiCfoOpen:y,mobileExploreReferrer:"Reimbursement Details"});Xe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:A}=ee(),{isFeatureEnabled:T}=A(k.isLimitedCategoryForReimbursement),[p,C]=h.useState(!1),[D,N]=h.useState(!1),[G,j]=h.useState(!1),{isFeatureEnabled:w}=A(k.isReimbursementCommentingEnabled),{isFeatureEnabled:S}=A(k.isShowDeletedReimbursementsFeatureEnabled),b=B(R=>ce(R,d??"")),M=Ot(o),U=_t(o.userRole),$=a.fetchState;if(h.useEffect(()=>{p||d==null?p==1&&$==="Error"&&e("page-not-found",{replace:!0}):(C(!0),t(Gt(d,!1,S)))},[p,d,t,$]),h.useEffect(()=>{S&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&M===!1?j(!1):j(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find(R=>R.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,M,m]),h.useEffect(()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||b.fetchState=="Completed"||b.fetchState=="In-Progress"||(N(!0),t(De(!1,T,S,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(zt(!1,!0,!0,a.lastUpdatedByUserId)))},[D,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&b.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(O,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&b.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(We,{}):s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:R=>(g=>{d!=null&&g.trackReimbursementReimbursementDetails(d)})(R)}),s.jsx(Qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:w,isShowDeletedReimbursementEnabled:S,location:n,navigate:e,isRealTimeApprovalEnabled:G,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:I,onAskAiCfoClick:x})]})}const Xn=K(function(e,t){return{remisReviewView:Pe(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(Z())},onCloseReviewItem:n=>{e(Kt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Jt());break;case"approve":e(ve("approved",r??""));break;case"reject":e(ve("rejected",r??""))}}}})(jn);function ea(){const e=J(),t=B(d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=B(d=>Pe(d)),r=ne(),c=r?.loggedInUserRole?.includes("admin")===!0;return h.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(Xn,{navigate:e,analytics:v,isAdmin:c})}const H=sn(),nt="bulk-operation-update",le="reimbursement-approval-rule-update",{spendManagement:ta,common:Te}=qe.getLocalizedStrings(),je=ta.reimbursement.bulkActions,na=_.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
min-height: 100%;
|
|
59
59
|
width: 100%;
|
|
@@ -61,8 +61,8 @@ import{j as s}from"./liveblocks-BeS4QmMp.js";import{j as J,h as me,u as W,l as X
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,aa=K(function(e,t){const n=_e(e,H,t.isBulkActionEnabled);let r=n.allSubTabs;const c=P.getSignedInUser(),d=ue(c),m=e.tenantState.currentTenantId,o=q(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(I=>I!=="deleted"));const u=n.fetchState,y=on(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(I=>I.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:u,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:H,spendManagementEndPoint:`${Nn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(Z()),e($e(o))},onSubtabChange:o=>{e(Z()),e(Oe(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=V(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=V(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=V(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(bn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(pn(o))},onFiltersChange:o=>{e(un({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(dn({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(oe(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(cn(o))},removeAllTransactionsFromBulkActionList:()=>{e(Z())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(mn(o,a??""));break;case"send_for_approval":e(Ee("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ee("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(le)&&e(ln(!1))},onEventReceived:o=>{o===nt&&e(rn())}}})(Un(Ln));function sa(){const{isAiCfoOpen:e,setIsAiCfoOpen:t}=ge(),n=J(),r=me(),c=W(),d=c.state,m=Ve(),[o,a]=h.useState(null),i=ut("/:tenantEmailDomain/reimbursements/bulk-review")!=null;h.useEffect(()=>{if(d?.tab!=null&&d?.subTab!=null){const f=
|
|
64
|
+
`,aa=K(function(e,t){const n=_e(e,H,t.isBulkActionEnabled);let r=n.allSubTabs;const c=P.getSignedInUser(),d=ue(c),m=e.tenantState.currentTenantId,o=q(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(I=>I!=="deleted"));const u=n.fetchState,y=on(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(I=>I.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:u,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:H,spendManagementEndPoint:`${Nn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(Z()),e($e(o))},onSubtabChange:o=>{e(Z()),e(Oe(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=V(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=V(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=V(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(bn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(pn(o))},onFiltersChange:o=>{e(un({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(dn({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(oe(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(cn(o))},removeAllTransactionsFromBulkActionList:()=>{e(Z())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(mn(o,a??""));break;case"send_for_approval":e(Ee("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ee("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(le)&&e(ln(!1))},onEventReceived:o=>{o===nt&&e(rn())}}})(Un(Ln));function sa(){const{isAiCfoOpen:e,setIsAiCfoOpen:t}=ge(),n=J(),r=me(),c=W(),d=c.state,m=Ve(),[o,a]=h.useState(null),i=ut("/:tenantEmailDomain/reimbursements/bulk-review")!=null;h.useEffect(()=>{if(d?.tab!=null&&d?.subTab!=null){const f=Qt(d.tab.toString());f!=null?r($e(f)):console.log("Warning:Not a valid remiListTab");const z=Yt(d.subTab.toString());z!=null?r(Oe(z)):console.log("Warning:Not a valid remiListSubTab")}return()=>{r(Z())}},[]);const{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:y}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isBillPayCommentingEnabled),{isFeatureEnabled:x}=l(k.isReimbursementCommentingEnabled),{isFeatureEnabled:A}=l(k.isReimbursementBulkActionEnabled),T=P.getSignedInUser(),p=B(f=>q(f)),[C,D]=h.useState(!1),[N,G]=h.useState(!1),j=ne(),w=j?.loggedInUserRole?.includes("admin")===!0,S=B(f=>_e(f,H,A)),{areTenantIdsInSync:b}=Dn(),M=S.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:$}=fe({isAiCfoOpen:e,setIsAiCfoOpen:t,mobileExploreReferrer:"Reimbursement List"});if(Xe({isDataReady:M==="Completed"}),h.useEffect(()=>{!N&&b&&(G(!0),r(oe(H,!0,y,!1,!0)))},[N,H,r,b]),T==null)throw Error("Can't access address page without signing in...");const R=!!p?.userRole&&Xt(p),g=pe(j?.loggedInUserRoleMap),ae=be(j?.loggedInUserRoleMap),at=!!p.userReimbursementInfo?.isReimbursementTOSAccepted,st=!!p.companyReimbursementInfo?.info?.isReimbursementEnabled,it=!!p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,ot=B(f=>Fe(f.companyState,p.companyId)),rt=ot?.company.featuresActivationInfo.connectedAccountProvider,Se=f=>{D(f)},{isFeatureEnabled:lt}=l(k.isDebitCardFeatureEnabled),mt=Ge(lt,p),ct=ze(p),{remisProcessed:Q,remisProcessing:Ie}=B(f=>en(f));h.useEffect(()=>{Q===Ie&&o!=null&&(r(tn({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:Q>1?je.reports:je.report},{variableName:"_has_",variableValue:Q>1?Te.texts.have:Te.texts.has},{variableName:"_action_",variableValue:nn(o)}]})),r(an()),setTimeout(()=>{r(oe(H,!0,y,!1,!0,!0))},3e3),a(null))},[Q,Ie]);const dt={events:p.companyId!=null?[`private-${p.companyId}.${nt}`,`private-${p.companyId}.${le}`]:[],eventCallback:(f,z,ye)=>{f.endsWith(le)?ye.onReimbursementApprovalRulesEventReceived?.(f):z.entity_type==="reimbursement"&&(a(z.operation_type),ye.onEventReceived(f))}};return c.pathname.endsWith("/reimbursements/")||c.pathname.endsWith("/reimbursements")||c.pathname.endsWith("/reimbursements/bulk-review")?mt===!0||ct===!0?s.jsx(Qe,{}):st&&(!R||g)||ae&&at?s.jsxs(s.Fragment,{children:[M==="Completed"?s.jsx(te,{analytics:v,onLoad:f=>(z=>z.trackPageLoaded(Je.Event.reimbursementHome))(f)}):null,s.jsx(et,{isAppContentDrawerOpen:C,handleDrawerToggle:Se}),s.jsxs(na,{windowSize:m,children:[s.jsx(On,{isOpen:i,drawerLeftMargin:new Fn(0,0,300,600),onClose:()=>{n("./"),r(Z())},children:s.jsx(ra,{onClick:f=>f.stopPropagation(),children:s.jsx(ea,{})})}),s.jsx(aa,{isShowDeletedBillsEnabled:u,isShowDeletedReimbursementEnabled:y,isBillPayCommentingEnabled:I,isReimbursementCommentingEnabled:x,location:c,navigate:n,currentTenant:p,period:H,isAdmin:w,isEmployee:R,entity:"reimbursement",onClickMenuIcon:()=>{Se(!0)},createdByUserList:S.createdByUserList,createdByUserListFetchState:S.createdByUserListFetchState,isDownloadEnabled:S.isDownloadEnabled,connectedAccountProvider:rt,isBulkActionEnabled:A,bulkSubmissionLimit:S.remiBulkSubmissionLimit,bulkSubmissionFetchState:S.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:U,onAskAiCfoClick:$,...dt})]})]}):it&&g?s.jsx(O,{to:"../setup"}):j!=null&&He(p,j.loggedInUserRoleMap)?s.jsx(O,{to:"../promo"}):s.jsx(he,{fetchState:"In-Progress"}):s.jsx(re,{})}const ia=e=>`/${e}/reimbursements/setup`,oa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ra=_($n)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
68
|
-
`,la=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:gn(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(fn(n))},onCreateNewRemiButtonClick:()=>{e(hn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Mn),ma=()=>{const e=J(),t=W(),{tenantEmailDomain:n}=X(),r=Ke(),[c,d]=h.useState(!1),m=B(C=>q(C)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),u=ne(),y=pe(u?.loggedInUserRoleMap),I=be(u?.loggedInUserRoleMap),x=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,A=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,T=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,p=C=>{d(C)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return A&&I&&x?s.jsx(O,{to:"../../../reimbursements"}):T&&y?s.jsx(O,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!T||m.userReimbursementInfo&&I&&x===!1?s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:C=>(
|
|
68
|
+
`,la=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:gn(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(fn(n))},onCreateNewRemiButtonClick:()=>{e(hn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Mn),ma=()=>{const e=J(),t=W(),{tenantEmailDomain:n}=X(),r=Ke(),[c,d]=h.useState(!1),m=B(C=>q(C)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),u=ne(),y=pe(u?.loggedInUserRoleMap),I=be(u?.loggedInUserRoleMap),x=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,A=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,T=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,p=C=>{d(C)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return A&&I&&x?s.jsx(O,{to:"../../../reimbursements"}):T&&y?s.jsx(O,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!T||m.userReimbursementInfo&&I&&x===!1?s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:C=>(D=>D.trackPageLoaded(Je.Event.reimbursementPromoPage))(C)}),s.jsx(et,{isAppContentDrawerOpen:c,handleDrawerToggle:p}),s.jsx(la,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{p(!0)}})]}):s.jsx(he,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Oa(){const e=B(R=>q(R)),t=ne(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Ke(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=ee(),{isFeatureEnabled:o}=m(k.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(k.isDebitCardFeatureEnabled),i=Ge(a,e),l=ze(e),u=e?.userRole!=null&&Sn(e?.userRole),y=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!u)&&In(t?.loggedInUserRoleMap),I=yn(t?.loggedInUserRoleMap),x=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!u,A=pe(t?.loggedInUserRoleMap),T=x&&A,{isFeatureEnabled:p}=m(k.isDepositAccountsFeatureEnabled),C=p&&!u&&An(t?.loggedInUserRoleMap),D=Pn(e,o,a)&&!u&&Rn(t?.loggedInUserRoleMap),N=Cn(t?.loggedInUserRoleMap),G=kn(t?.loggedInUserRoleMap),j=vn(t?.loggedInUserRoleMap),w=En(t?.loggedInUserRoleMap),S=Bn(t?.loggedInUserRoleMap),b=be(t?.loggedInUserRoleMap),{tenantEmailDomain:M}=X(),U=W(),$=n===!0&&(A||b&&d);return s.jsxs(pt,{children:[U.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"verification",element:s.jsx(we,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:D,isUserHasOnlyCardAccess:N,productType:"reimbursement",type:"verification"})}),s.jsx(E,{path:"setup",element:s.jsx(we,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:D,isUserHasOnlyCardAccess:N,productType:"reimbursement",type:"setup"})}),s.jsx(E,{path:"promo",element:s.jsx(ma,{})}),s.jsx(E,{path:"approval-rules/*",element:T?s.jsx(_n,{}):s.jsx(Gn,{isUserHasZeniAccountsAccess:G,isUserHasChargeCardAccess:w,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:b,isUserHasTreasuryAccess:j,isTenantBankingOnly:i,tenantEmailDomain:M??""})}),$&&s.jsx(E,{path:"*",element:s.jsx(sa,{})}),(i===!0||l===!0)&&s.jsx(E,{path:"/*",element:s.jsx(Qe,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(E,{path:"*",element:s.jsx(O,{to:"../promo"})}),c&&A&&s.jsx(E,{path:"*",element:s.jsx(O,{to:"../setup"})})]}):U.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"new",element:s.jsx(xe,{})}),s.jsx(E,{path:":reimbursementId",element:s.jsx(Yn,{})}),s.jsx(E,{path:":reimbursementId/edit",element:s.jsx(xe,{})}),s.jsx(E,{path:"*",element:s.jsx(re,{})})]}):s.jsx(E,{path:"*",element:s.jsx(he,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${F.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(E,{path:"*",element:s.jsx(re,{})})]})}export{Oa as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-BeS4QmMp.js";import{u as G,j as be,h as Ie,l as ye,g as d,k as Ce,n as ge,o as N}from"./core-DcM32IW_.js";import{eN as M,f7 as g,IF as Se,jq as W,IG as J,pI as F,je as we,ih as Re,t1 as Te,pN as Oe,bv as Fe,IH as Ae,bn as ke,u4 as De,II as Ee,IJ as Pe,sZ as je,t5 as Me,IK as Y,IL as Le,IM as Be,IN as ve,IO as Ue,IP as S,IQ as A,IR as k,IS as H,IT as D,IU as E,dB as Ve,tM as xe,tA as q,tB as $,tS as ze,tF as Z,tY as Ge,IV as Ne,IW as Ye,IX as He,IY as qe,IZ as $e,eT as Ze,eR as Qe}from"./zeni-epic-state-ChnjRetZ.js";import{K as Ke,M as We,q as Je,a as X,p as P,z as ee,N as Xe,k as ea,c as aa,C as sa,d as j,f as ta,v as ae,O as oa,Q as na,R as ra}from"./index-DSBNuTzQ.js";import"./mui--qrGbwFJ.js";import ia from"./NotFoundScreen-BQueQzhs.js";import{F as la}from"./FeaturePreviewScreen-PkNswvQo.js";import{a as h}from"./sentry-BlmJH5WH.js";import{u as ca,a as da,b as pa,c as fa}from"./useFetchSuggestedQuestionsWhenReady-SU-quGCv.js";import{u as ma}from"./useInitialThreadRequest-82Lo2xWZ.js";import{t as Q,a as K}from"./routePaths-Dr0mF--c.js";import{M as ua}from"./MobileAppDrawer-BeJ-If8M.js";import"./recharts-DoWl4vaN.js";import"./analytics-ByrfXPqG.js";import"./plaid-BZ0BFqP0.js";import"./dnd-36WXho_9.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bdncx-qB.js";import"./lexical-CYAYrhLa.js";import"./pdf-6nmWWkz8.js";import"./utils-RmRP6xA4.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]="8f695c68-f7be-4938-8665-79701deca8b6",e._sentryDebugIdIdentifier="sentry-dbid-8f695c68-f7be-4938-8665-79701deca8b6")}catch{}})();const _a=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ha=e=>{e(Ye()),e(He()),e(qe()),e($e())},ba=Ce(function(e){const o=ee.getSignedInUser(),f=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=g(e),r=Ae(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:j,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:J(e),currentTenantCompanyName:a,statementEndPoint:`${ra}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ne(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(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(Y({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(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(()=>I(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,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{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,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return K(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?K(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=ae(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(A({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(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(ve({viewMode:a})),e(Ue({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Be({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(je()),o.isAccountingProjectsEnabled&&e(Me())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ha(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(oa);function Ia(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=Je(),u=na(f),a=be(),s=Ie(),t=G(),{tenantEmailDomain:r}=ye(),{useFeatureGate:c}=X(),{isFeatureEnabled:m}=c(P.isReportsHorizontalClassLayoutSwitchEnabled),l=ee.getSignedInUser(),[i,y]=h.useState(!1),[L,se]=h.useState(!1),{isFeatureEnabled:B}=c(P.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=d(n=>M(n)),te=v.company?.companyInfo.firstMonthOfFY??1,oe=ma(B?v?.companyId:void 0),C=d(n=>g(n).fetchState),ne=d(n=>Se(n)),{areTenantIdsInSync:b}=Xe(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>W(n)),T=d(n=>J(n)),re=d(n=>g(n).isCompareModeOn),_=d(n=>g(n).filter),O=d(n=>g(n).selectedReportAndTimeframeFetchState),ie=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);h.useEffect(()=>{!i&&b&&(y(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,b]),h.useEffect(()=>{i&&!L&&C==="Completed"&&b&&(s(F(l.userId,!1,!0,!1)),se(!0))},[i,L,C,b]),h.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&_.timeframe!=="free_range"&&_.timeframe!=="week"&&b)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(_.timeframe));break;case"profit_and_loss_by_projects":T&&s(Te(_.timeframe));break;case"balance_sheet":s(Re(_.timeframe));break;case"cash_flow":s(we(_.timeframe))}},[i,R,O,b,U,T]);const V=ea(),le=V?.loggedInUserRole!=null&&Fe(V?.loggedInUserRole)!==!0,[ce,de]=h.useState(!1),x=n=>{de(n)},pe=aa(),fe=pa();return function(n){const{isDataReady:me}=n,{pathname:ue}=G(),z=Ke(ue??"")==="reports",_e=ca(me),he=h.useMemo(()=>z?_a:void 0,[z]);da({canFetchSuggestedQuestions:_e,pageContexts:he})}({isDataReady:C==="Completed"}),fa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(sa,{analytics:j,onLoad:n=>n.trackPageLoaded(ta.Event.reports)}):null,p.jsx(ua,{isAppContentDrawerOpen:ce,handleDrawerToggle:x}),p.jsx(ba,{firstMonthOfFY:te,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ie,selectedReportID:R,analytics:j,filter:_,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:T,isCompareModeOn:re,hasTransactionAccess:le,signedInUser:l,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ne.reportsResyncFetchState,isAiCfoAccessEnabled:fe&&pe&&!e,onAskAiCfoClick:()=>{if(u){const n=ae(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:oe})]})}const w=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 xa(){const e=d(s=>M(s)),{useFeatureGate:o}=X(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=Ze(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(la,{}):p.jsxs(ge,{children:[p.jsx(N,{path:"/",element:p.jsx(Ia,{})}),p.jsx(N,{path:"*",element:p.jsx(ia,{})})]})}export{xa as default};
|
|
1
|
+
import{j as p}from"./liveblocks-tcXs1fes.js";import{u as G,j as be,h as Ie,l as ye,g as d,k as ge,n as Ce,o as Y}from"./core-DkPdadc6.js";import{eN as M,f7 as C,IF as Se,jq as W,IG as J,pI as O,je as we,ih as Re,t1 as Te,pN as Fe,bv as Oe,IH as Ae,bn as ke,u4 as De,II as je,IJ as Ee,sZ as Pe,t5 as Me,IK as H,IL as Le,IM as Be,IN as ve,IO as Ue,IP as S,IQ as A,IR as k,IS as N,IT as D,IU as j,dB as Ve,tM as xe,tA as q,tB as $,tS as ze,tF as Z,tY as Ge,IV as Ye,IW as He,IX as Ne,IY as qe,IZ as $e,eT as Ze,eR as Qe}from"./zeni-epic-state-CSoWjbAn.js";import{K as Ke,M as We,q as Je,a as X,p as E,z as ee,Q as Xe,j as ea,c as aa,x as sa,d as P,f as ta,r as ae,R as oa,T as na,U as ra}from"./index-CpD5ML2i.js";import"./mui-DbdGpDJj.js";import ia from"./NotFoundScreen-DpPEAqIa.js";import{F as la}from"./FeaturePreviewScreen-BbZ1xf4z.js";import{a as h}from"./sentry-DNuKG-9f.js";import{u as ca,a as da,b as pa,c as ma}from"./useFetchSuggestedQuestionsWhenReady-Bhmav9DR.js";import{u as fa}from"./useInitialThreadRequest-DId3URPK.js";import{t as Q,a as K}from"./routePaths-D7wc65Bl.js";import{M as ua}from"./MobileAppDrawer-n8t03yaO.js";import"./recharts-D0a4NFa9.js";import"./analytics-CcGmsyc8.js";import"./plaid-UeHpA8su.js";import"./dnd-D-YvLFfj.js";import"./stripe-DMRn4zHo.js";import"./lottie-CwApzZxI.js";import"./lexical-Sc7rk4Y7.js";import"./pdf-DG2fyOfp.js";import"./utils-BmJyX3cx.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]="ea01a3eb-a4b8-48c5-a426-9491715de620",e._sentryDebugIdIdentifier="sentry-dbid-ea01a3eb-a4b8-48c5-a426-9491715de620")}catch{}})();const _a=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ha=e=>{e(He()),e(Ne()),e(qe()),e($e())},ba=ge(function(e){const o=ee.getSignedInUser(),m=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:m??""},t=C(e),r=Ae(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:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:J(e),currentTenantCompanyName:a,statementEndPoint:`${ra}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:m,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ye(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:f,balancesRange:l}=c;let i=[...f];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),f.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(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"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(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(()=>I(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,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{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,f,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return K(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?K(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,c):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,f,r,c):void 0})();if(l!=null){const i=ae(o.location.state?.pathnameStackToGoBack,o.location.pathname);m(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(A({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(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{m("../../")},onUpdateAccountViewMode:a=>{e(ve({viewMode:a})),e(Ue({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Be({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(Me())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ha(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(oa);function Ia(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),m=Je(),u=na(m),a=be(),s=Ie(),t=G(),{tenantEmailDomain:r}=ye(),{useFeatureGate:c}=X(),{isFeatureEnabled:f}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=ee.getSignedInUser(),[i,y]=h.useState(!1),[L,se]=h.useState(!1),{isFeatureEnabled:B}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=d(n=>M(n)),te=v.company?.companyInfo.firstMonthOfFY??1,oe=fa(B?v?.companyId:void 0),g=d(n=>C(n).fetchState),ne=d(n=>Se(n)),{areTenantIdsInSync:b}=Xe(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>W(n)),T=d(n=>J(n)),re=d(n=>C(n).isCompareModeOn),_=d(n=>C(n).filter),F=d(n=>C(n).selectedReportAndTimeframeFetchState),ie=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);h.useEffect(()=>{!i&&b&&(y(!0),s(O(l.userId,!0,!0,!1)))},[i,l,s,b]),h.useEffect(()=>{i&&!L&&g==="Completed"&&b&&(s(O(l.userId,!1,!0,!1)),se(!0))},[i,L,g,b]),h.useEffect(()=>{if(i&&F.fetchState==="Not-Started"&&_.timeframe!=="free_range"&&_.timeframe!=="week"&&b)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Fe(_.timeframe));break;case"profit_and_loss_by_projects":T&&s(Te(_.timeframe));break;case"balance_sheet":s(Re(_.timeframe));break;case"cash_flow":s(we(_.timeframe))}},[i,R,F,b,U,T]);const V=ea(),le=V?.loggedInUserRole!=null&&Oe(V?.loggedInUserRole)!==!0,[ce,de]=h.useState(!1),x=n=>{de(n)},pe=aa(),me=pa();return function(n){const{isDataReady:fe}=n,{pathname:ue}=G(),z=Ke(ue??"")==="reports",_e=ca(fe),he=h.useMemo(()=>z?_a:void 0,[z]);da({canFetchSuggestedQuestions:_e,pageContexts:he})}({isDataReady:g==="Completed"}),ma({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(sa,{analytics:P,onLoad:n=>n.trackPageLoaded(ta.Event.reports)}):null,p.jsx(ua,{isAppContentDrawerOpen:ce,handleDrawerToggle:x}),p.jsx(ba,{firstMonthOfFY:te,tenantEmailDomain:r,location:t,navigate:a,windowSize:m,classViewLayout:ie,selectedReportID:R,analytics:P,filter:_,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:T,isCompareModeOn:re,hasTransactionAccess:le,signedInUser:l,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:x,reportsResyncFetchState:ne.reportsResyncFetchState,isAiCfoAccessEnabled:me&&pe&&!e,onAskAiCfoClick:()=>{if(u){const n=ae(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:B,initialOpenThreadRequest:oe})]})}const w=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 xa(){const e=d(s=>M(s)),{useFeatureGate:o}=X(),{isFeatureEnabled:m}=o(E.isDebitCardFeatureEnabled),u=Ze(m,e),a=Qe(e);return u===!0||a===!0?p.jsx(la,{}):p.jsxs(Ce,{children:[p.jsx(Y,{path:"/",element:p.jsx(Ia,{})}),p.jsx(Y,{path:"*",element:p.jsx(ia,{})})]})}export{xa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-tcXs1fes.js";import{a as j,z as w,aJ as y,x as I,d as p,f as F,cD as P,p as L}from"./index-CpD5ML2i.js";import"./mui-DbdGpDJj.js";import l from"./NotFoundScreen-DpPEAqIa.js";import{a as f}from"./sentry-DNuKG-9f.js";import{h as T,g as b,j as V,u as A,k as R,n as U,o as d}from"./core-DkPdadc6.js";import{eN as z,Pg as C,M6 as Y,Ph as D,tr as G,eZ as J,Pi as M,tp as O}from"./zeni-epic-state-CSoWjbAn.js";import{R as x}from"./ReferralListScreen-Dy8iQFPt.js";import"./recharts-D0a4NFa9.js";import"./analytics-CcGmsyc8.js";import"./plaid-UeHpA8su.js";import"./dnd-D-YvLFfj.js";import"./stripe-DMRn4zHo.js";import"./lottie-CwApzZxI.js";import"./lexical-Sc7rk4Y7.js";import"./pdf-DG2fyOfp.js";import"./utils-BmJyX3cx.js";import"./useAskAiCfoHostNavButtonProps-BtZXhZ4f.js";import"./useFetchSuggestedQuestionsWhenReady-Bhmav9DR.js";import"./MobileAppDrawer-n8t03yaO.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]="6184df3a-d3cc-4ae1-8ea2-ef3bb268c6f8",e._sentryDebugIdIdentifier="sentry-dbid-6184df3a-d3cc-4ae1-8ea2-ef3bb268c6f8")}catch{}})();const Z=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(D()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(M({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(P),q=()=>{const e=T(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=b(i=>z(i)),c=V(),k=A(),{useDynamicConfig:g}=j(),u=w.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),v=u?.firstName!=null?u.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:_}=g(y.zeniAccountsConfig),N=Y(_);f.useEffect(()=>{e(D()),r?.rewardsLastViewedTime==null&&o===!1&&(e(G()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(J(!0)))},[m.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:i=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(Z,{navigate:c,location:k,currentTenant:r,companyName:S,userName:v,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(q,{}):a.jsx(l,{})}),a.jsx(d,{path:"*",element:a.jsx(l,{})})]})}export{ue as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as n,bn as os,eN as ls,eT as cs,eR as ds,eS as ms,fC as us,eP as _s,cO as Ae,cv as As,f8 as Es,cn as ps,bC as Is,bq as gs,fd as xs,v as Ts,Ij as hs,bv as js,Ik as Us,bE as Hs,fa as Rs,bD as Ds,bs,cj as ys,Il as fs,Im as Cs,cL as vs,cN as Os,cM as Ps,cu as Fs,cA as Ls,ml as Ee,eO as pe,fM as ks,fh as Ie,fJ as ge,fK as xe,fi as Bs}from"./zeni-epic-state-ChnjRetZ.js";import{j as e}from"./liveblocks-BeS4QmMp.js";import{a as v}from"./sentry-BlmJH5WH.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-DcM32IW_.js";import{h as ws,u as zs,z as R,a as Gs,c as $s,W as Ws,p as L,k as Ys,L as k,D as he,t as _,P as qs,d as X,l}from"./index-DSBNuTzQ.js";import"./mui--qrGbwFJ.js";import{f as je}from"./analyticsHelper-BZYQYc1O.js";import{t as Js}from"./getLocaleForTenant-h7G676lL.js";import"./recharts-DoWl4vaN.js";import"./analytics-ByrfXPqG.js";import"./plaid-BZ0BFqP0.js";import"./dnd-36WXho_9.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bdncx-qB.js";import"./lexical-CYAYrhLa.js";import"./pdf-6nmWWkz8.js";import"./utils-RmRP6xA4.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]="82f35d81-f922-448e-a165-5b0dc0634937",i._sentryDebugIdIdentifier="sentry-dbid-82f35d81-f922-448e-a165-5b0dc0634937")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-DDAZzkgF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-zS41FDXZ.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-CEjpsr8X.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-BQchWm8T.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-DCgs4OLl.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-UBnZ8bDz.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-CuAdoqYf.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-Du_86K0g.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-CL2KITKF.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-BtpbVTG-.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-DZy6VVP0.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-CQIW5-uh.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-UBnZ8bDz.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-DNt7Duo0.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-Du_86K0g.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-mNWJpjrX.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-CpFbCHUf.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-DZy6VVP0.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-D9aq9a6c.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-QqB5pqCq.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-DDAZzkgF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>n(()=>import("./BillPayRoutes-zS41FDXZ.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-DCgs4OLl.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-CEjpsr8X.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-CQIW5-uh.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-BtpbVTG-.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-BQchWm8T.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-CuAdoqYf.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-B1POEpf-.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),An=l(()=>n(()=>import("./PerformanceRoutes-CX1dBnw2.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-CL2KITKF.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-q5pGdj79.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-D1q4DIf6.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-bBUSfHWB.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-BQueQzhs.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-DFdZjWgl.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,be]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),K=$s(),ye=Ws(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),E=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,ke=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:Be}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),W=z(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),A=Ys(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?Es(a,w.tenantId):void 0);v.useEffect(()=>{f(k.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&b!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,b]),v.useEffect(()=>{N||(be(!0),f(k.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(k.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(ks(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(k.TENANT_FETCHING),function(a,H,d,s,m,M,B){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(Y&&ts){B(Ie(s));const q=R.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(xe(m.userId,s)))}else Y&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(ge(m.userId,s))),Y&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(xe(m.userId,s)));if(Y){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(k.TENANT_FETCHING),B(Bs(m.userId,s,m.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,b,h,f,U))},[b,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&W.tenantsBaseInOrder.length>0&&(Z(k.TENANT_FETCHING),R.saveSignedInUserTenants(hs(W.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,W.tenantsBaseInOrder))},[W,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(k.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):E==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(k.TENANT_FETCHING),Z(k.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(a=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=ke&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!C,We=r.company!=null&&Rs(r.company),Ye=Pe&&We===!0&&!C,qe=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&bs(A?.loggedInUserRoleMap),Ke=me&&ys(A?.loggedInUserRoleMap),Qe=fs(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=Ye&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(en,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Be?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(gn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):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:{...G.state,message:"...",origin:G.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,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"}):f?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:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-DmT1zvbt.js","assets/sentry-DNuKG-9f.js","assets/core-DkPdadc6.js","assets/zeni-epic-state-CSoWjbAn.js","assets/index-CpD5ML2i.js","assets/mui-DbdGpDJj.js","assets/analytics-CcGmsyc8.js","assets/utils-BmJyX3cx.js","assets/withTransactionSidePanel-CzkV98Uv.js","assets/useAskAiCfoHostNavButtonProps-BtZXhZ4f.js","assets/useFetchSuggestedQuestionsWhenReady-Bhmav9DR.js","assets/TransactionDetailScreen-BARgRHWT.js","assets/decodeURIComponentSafe-h3wJzOm1.js","assets/routePaths-D7wc65Bl.js","assets/NotFoundScreen-DpPEAqIa.js","assets/analyticsHelper-DJMvFBQ1.js","assets/CompanyPassportScreen-Q42ItsTK.js","assets/MobileAppDrawer-n8t03yaO.js","assets/FeaturePreviewScreen-BbZ1xf4z.js","assets/ReferralListScreen-Dy8iQFPt.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-C_kzPWNw.js","assets/AddressScreen-BklJKutc.js","assets/DomesticWireDetailScreen-Ba2RcbCG.js","assets/useInitialThreadRequest-DId3URPK.js","assets/DrawerScreen-GbmWLeG7.js","assets/SetupPagesScreen-BaBZaUCN.js","assets/BusinessVerificationPageScreen-DgymQkoP.js","assets/BillPayApprovalRoutes-SfFy4Q3x.js","assets/ReimbursementApprovalRuleDetailScreen-DuDkeiAm.js","assets/getLocaleForTenant-FjCgXmXO.js","assets/ReimbursementRoutes-BOMyJgrz.js","assets/ReimbursementApprovalRoutes-BbOdeAtw.js","assets/TransactionListRoutes-FB1Nag0X.js","assets/ZeniAccountStatementScreen-CqjHqKdC.js","assets/SettingsRoutes-r9Ej5ZGq.js","assets/accountMappingHelper-BOSY12FJ.js","assets/QBOConnectionScreen-DyznN-F2.js","assets/empty-C7PzWdR6.js","assets/index-BVoPsTXN.js","assets/url-Bxb4Dr7g.js","assets/index-ufE2I9Jb.js","assets/ReportsRoutes-BSTB7uRz.js","assets/ChargeCardRoutes-DKy3Qza2.js","assets/PeopleRoutes-7E-ffjBJ.js","assets/ExpenseAutomationRoutes-CO8PFCnO.js","assets/TreasuryRoutes-D09j5H5F.js","assets/VendorsRoutes-CMOWuwxW.js","assets/pathToGoBack-D9y2NyzP.js","assets/ZeniAccountRoutes-CvMBgZsl.js","assets/AddressRoutes-T4qftw_1.js","assets/PandLWithForecastRoutes-Wtfusoui.js","assets/CustomerOnboardingRoutes-BeIEf537.js","assets/TransactionDetailRoutes-DLz2n5Pp.js","assets/EntityDetailRoutes-EYGmcLTc.js","assets/NotificationRoutes-TwQiwNf3.js","assets/PerformanceRoutes-CHrolr76.js","assets/RewardsRoutes-vMUR4VOs.js","assets/TaskRoutes-BAXcXFEg.js","assets/TaskListScreen-Bvnm9IXP.js","assets/AiCfoScreen-B4xK4s4e.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n,bn as os,eN as ls,eT as cs,eR as ds,eS as ms,fC as us,eP as _s,cO as Ae,cv as As,f8 as Es,cn as ps,bC as Is,bq as gs,fd as xs,v as Ts,Ij as hs,bv as js,Ik as Us,bE as Hs,fa as Rs,bD as Ds,bs,cj as ys,Il as fs,Im as Cs,cL as vs,cN as Os,cM as Ps,cu as Fs,cA as Ls,ml as Ee,eO as pe,fM as Bs,fh as Ie,fJ as ge,fK as xe,fi as ks}from"./zeni-epic-state-CSoWjbAn.js";import{j as e}from"./liveblocks-tcXs1fes.js";import{a as v}from"./sentry-DNuKG-9f.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-DkPdadc6.js";import{h as ws,u as zs,z as R,a as Gs,c as $s,H as Ys,p as L,j as qs,L as B,D as he,t as _,P as Ws,d as X,l}from"./index-CpD5ML2i.js";import"./mui-DbdGpDJj.js";import{f as je}from"./analyticsHelper-DJMvFBQ1.js";import{t as Js}from"./getLocaleForTenant-FjCgXmXO.js";import"./recharts-D0a4NFa9.js";import"./analytics-CcGmsyc8.js";import"./plaid-UeHpA8su.js";import"./dnd-D-YvLFfj.js";import"./stripe-DMRn4zHo.js";import"./lottie-CwApzZxI.js";import"./lexical-Sc7rk4Y7.js";import"./pdf-DG2fyOfp.js";import"./utils-BmJyX3cx.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]="72f91958-afb5-425a-9c36-6093c5c66440",i._sentryDebugIdIdentifier="sentry-dbid-72f91958-afb5-425a-9c36-6093c5c66440")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-DmT1zvbt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-C_kzPWNw.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-BOMyJgrz.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-FB1Nag0X.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-r9Ej5ZGq.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-BSTB7uRz.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-DKy3Qza2.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-7E-ffjBJ.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-CO8PFCnO.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-D09j5H5F.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-CMOWuwxW.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-CvMBgZsl.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-BSTB7uRz.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-T4qftw_1.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-7E-ffjBJ.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-Wtfusoui.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-BeIEf537.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-CMOWuwxW.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-DLz2n5Pp.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-EYGmcLTc.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-DmT1zvbt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>n(()=>import("./BillPayRoutes-C_kzPWNw.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-r9Ej5ZGq.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-BOMyJgrz.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-CvMBgZsl.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-D09j5H5F.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-FB1Nag0X.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-DKy3Qza2.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-TwQiwNf3.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),An=l(()=>n(()=>import("./PerformanceRoutes-CHrolr76.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-CO8PFCnO.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-vMUR4VOs.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-BAXcXFEg.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-B4xK4s4e.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-DpPEAqIa.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-Bvnm9IXP.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,be]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),K=$s(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),E=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),A=qs(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?Es(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&b!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,b]),v.useEffect(()=>{N||(be(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=R.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,b,h,f,U))},[b,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):E==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(a=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Rs(r.company),qe=Pe&&Ye===!0&&!C,We=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&bs(A?.loggedInUserRoleMap),Ke=me&&ys(A?.loggedInUserRoleMap),Qe=fs(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=qe&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Ke||Je?e.jsx(en,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(gn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):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:{...G.state,message:"...",origin:G.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,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"}):f?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:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
|