@zeniai/web-app-ui 5.1.64-qa → 5.1.65-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-ZPs03itT.js +1 -0
- package/dist/assets/{AddressScreen-ay95AjyT.js → AddressScreen-DRkNCoFL.js} +2 -2
- package/dist/assets/{AiCfoScreen-CNSskoeK.js → AiCfoScreen-D-u8ipUi.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DkRTzCH3.js → BillPayApprovalRoutes-BvU9483p.js} +1 -1
- package/dist/assets/{BillPayRoutes-AaRkKbnn.js → BillPayRoutes-BU_8K1M6.js} +8 -8
- package/dist/assets/{BusinessVerificationPageScreen-BK-kRDjQ.js → BusinessVerificationPageScreen-BTZMu3mu.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-CNTdAWSK.js → ChargeCardRoutes-Xtry7c49.js} +10 -10
- package/dist/assets/CompanyPassportScreen-CflJgZzM.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-Ctz5ySya.js → ConnectionAuthScreen-BEwd3uud.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-Bd9wJ72z.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-2jxeCtoH.js → CustomerOnboardingRoutes-C_F3TxKa.js} +4 -4
- package/dist/assets/{DashboardRoutes-DKnI8ITO.js → DashboardRoutes-GIiFG-1s.js} +3 -3
- package/dist/assets/{DefaultTenantHome-DrzRK_A3.js → DefaultTenantHome-DL6SBBlS.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BpjCiEQT.js → DomesticWireDetailScreen-DQfmG0KY.js} +3 -3
- package/dist/assets/DrawerScreen-COKN8vXf.js +1 -0
- package/dist/assets/{EntityDetailRoutes-Ck3_JPiA.js → EntityDetailRoutes-BVL9ZAaH.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-Bk7qpJQq.js → ExpenseAutomationRoutes-B65oMKGx.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-qdJQX-H8.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-DlLZNfdx.js → HubSpotOAuthCallbackScreen-DHyw1pK9.js} +1 -1
- package/dist/assets/MagicLinkRoutes-BIkgPK91.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-C4HXJpeQ.js +12 -0
- package/dist/assets/{MobileAppDrawer-KB2L4yYh.js → MobileAppDrawer-CrgnLvLU.js} +1 -1
- package/dist/assets/NotFoundScreen-v5_de3EY.js +1 -0
- package/dist/assets/{NotificationRoutes-CUoWsLW6.js → NotificationRoutes-P-83L_ys.js} +1 -1
- package/dist/assets/OAuthConsentScreen-IVBM6Dko.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-_37Co_bv.js +1 -0
- package/dist/assets/PeopleRoutes-DS3elLhn.js +22 -0
- package/dist/assets/PerformanceRoutes-BkeJXfUd.js +1 -0
- package/dist/assets/{Preview-BGhmLxMi.js → Preview-BcvozuOU.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BjBRgjPW.js → QBOConnectionScreen-BgQQew_6.js} +1 -1
- package/dist/assets/ReferralListScreen-DuGf9HFb.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-Dd6B4kce.js → ReimbursementApprovalRoutes-CbRVuJWF.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BLwUi-7g.js → ReimbursementApprovalRuleDetailScreen-CVwi5aJZ.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BtesSDuB.js → ReimbursementRoutes-D5yYUU5V.js} +4 -4
- package/dist/assets/{ReportsRoutes-Ypov_XRg.js → ReportsRoutes-D75uQqxz.js} +1 -1
- package/dist/assets/RewardsRoutes-fbazCSso.js +1 -0
- package/dist/assets/{ScreenRoutes-Bt5RxjsW.js → ScreenRoutes-BCcnBfC_.js} +2 -2
- package/dist/assets/{SettingsRoutes-d9SQJouF.js → SettingsRoutes-B9LjzWe2.js} +4 -4
- package/dist/assets/{SetupPagesScreen-UbKhsOme.js → SetupPagesScreen-BXETP8g-.js} +1 -1
- package/dist/assets/SignInScreen-Dt-aJmha.js +1 -0
- package/dist/assets/SignOutScreen-CpGvmkUq.js +9 -0
- package/dist/assets/{TaskListScreen-yP29eLKe.js → TaskListScreen-DMtc09u5.js} +2 -2
- package/dist/assets/TaskRoutes-CdtXHU0-.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-DIIsxXoI.js → TransactionDetailRoutes-D7bsCiCx.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DbVp_oOR.js → TransactionDetailScreen-Cx8OkHWh.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BFm1xRNi.js → TransactionListRoutes-CPPEwrQh.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BQeFHsY5.js → TreasuryRoutes-BPDk9A8T.js} +5 -5
- package/dist/assets/{VendorsRoutes-BCP9sJSY.js → VendorsRoutes-7Qv63VB1.js} +16 -16
- package/dist/assets/WiseConfirmationScreen--ohBUsvV.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-OW53QlAG.js → ZeniAccountRoutes-jdmuBqTz.js} +7 -7
- package/dist/assets/{ZeniAccountStatementScreen-DStzdW01.js → ZeniAccountStatementScreen-Bpoumjnq.js} +2 -2
- package/dist/assets/{accountMappingHelper-BY9t_bFx.js → accountMappingHelper-DcHRTvHW.js} +1 -1
- package/dist/assets/{analytics-DW163hO6.js → analytics-C--DBRuq.js} +1 -1
- package/dist/assets/{analyticsHelper-C1JBjAI6.js → analyticsHelper-De1N1-Zw.js} +1 -1
- package/dist/assets/{core-BYU75o8V.js → core-yFUZRhgi.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-3IGQd7Vl.js → decodeURIComponentSafe-DJGiVKY3.js} +1 -1
- package/dist/assets/{dnd-BzfEm7I9.js → dnd-BsfjgQaS.js} +1 -1
- package/dist/assets/{empty-YJQb3-X2.js → empty-36OhCPgu.js} +1 -1
- package/dist/assets/{empty-CVodrPUR.js → empty-DWXN0zXu.js} +1 -1
- package/dist/assets/{emptyVideoElement-CCQQOb7A.js → emptyVideoElement-W528gJEP.js} +1 -1
- package/dist/assets/{epic-Nyy58_dJ.js → epic-CIRzUJFx.js} +1 -1
- package/dist/assets/getLocaleForTenant-DYvzcoGq.js +1 -0
- package/dist/assets/{index-etDo2Eg5.js → index-BN3A7Q7k.js} +1 -1
- package/dist/assets/{index-CT-SvzqM.js → index-Biw-dXZD.js} +1 -1
- package/dist/assets/{index-DTeE9HW6.js → index-BjC87z-8.js} +1 -1
- package/dist/assets/{index-9RSiem2N.js → index-D6SI2XXD.js} +1 -1
- package/dist/assets/{index-Dx7rMgzH.js → index-D8lrtix7.js} +1 -1
- package/dist/assets/{index-X9jJEgSP.js → index-Tz5qKzzr.js} +2 -2
- package/dist/assets/{index-BpRPgE_1.js → index-_WROnW1b.js} +1 -1
- package/dist/assets/{index-CTd0IcDC.js → index-jqYKktfd.js} +11072 -11076
- package/dist/assets/{lexical-a4Oisgnk.js → lexical-a5QW-f2c.js} +1 -1
- package/dist/assets/{liveblocks-DpbFof4_.js → liveblocks-DQxWCA7d.js} +1 -1
- package/dist/assets/{lottie-DkmqGRq5.js → lottie-CUC8jYi2.js} +1 -1
- package/dist/assets/{mui-CaUmS2In.js → mui-ChC8whdU.js} +1 -1
- package/dist/assets/{pathToGoBack-TOnIZxyK.js → pathToGoBack-48OEEFN8.js} +1 -1
- package/dist/assets/{pdf-Bp96SSrk.js → pdf-BzsAlPE_.js} +3 -3
- package/dist/assets/{pdf-lib-C5R5lVxX.js → pdf-lib-Bunmyp1f.js} +1 -1
- package/dist/assets/{plaid-EPzkqVUX.js → plaid-G4AU8x-v.js} +1 -1
- package/dist/assets/{pusher-DFce9zoz.js → pusher-C00F4DWB.js} +1 -1
- package/dist/assets/{react-bKgyDTt8.js → react-7oSJc21D.js} +1 -1
- package/dist/assets/{react-DaYEBWeP.js → react-B-EV2fAl.js} +1 -1
- package/dist/assets/{react-BaW6LEQr.js → react-B_Y4cViF.js} +1 -1
- package/dist/assets/{react-BrbrBbbh.js → react-C6PubH1a.js} +1 -1
- package/dist/assets/{react-CbOWaQLc.js → react-gwfdXk9P.js} +1 -1
- package/dist/assets/{react-Cg2u8AqZ.js → react-y_zdXwGN.js} +1 -1
- package/dist/assets/{recharts-eaz7OFOH.js → recharts-BPALCGe7.js} +1 -1
- package/dist/assets/{routePaths-DtPkVCZ8.js → routePaths-Bboudd1B.js} +1 -1
- package/dist/assets/{sentry-B2BY3pFv.js → sentry-yFsVWhao.js} +1 -1
- package/dist/assets/{url-BeLBCtjP.js → url-CItc7ZnZ.js} +1 -1
- package/dist/assets/{url-Bzmb-SBW.js → url-DdmozPE3.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BYrJCl-g.js → useAiCfoDashboardSuggestedQuestionsChips-BMRAWQ1G.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CVkVwVMM.js +1 -0
- package/dist/assets/{useDeviceId-CWQ4jMCH.js → useDeviceId-BY2vlOSe.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-jFDMxuZj.js → useInitialThreadRequest-Ds4FzIV5.js} +1 -1
- package/dist/assets/{utils-w1fZp2Am.js → utils-CaIGWeOv.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CDwmH7-e.js → withTransactionSidePanel-Ufj2Gl6g.js} +2 -2
- package/dist/assets/{zeni-epic-state-De2ZE3v5.js → zeni-epic-state-Co_KJ39L.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-CfeuS_Ag.js +0 -1
- package/dist/assets/CompanyPassportScreen-CAEa8inv.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CdyKCXfZ.js +0 -1
- package/dist/assets/DrawerScreen-TcF0aKWR.js +0 -1
- package/dist/assets/FeaturePreviewScreen-FqmwbgK1.js +0 -1
- package/dist/assets/MagicLinkRoutes-Bjfp8zDK.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-sO4caWMt.js +0 -12
- package/dist/assets/NotFoundScreen-DTlzuW8g.js +0 -1
- package/dist/assets/OAuthConsentScreen-LyQVO638.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DuUVhGFv.js +0 -1
- package/dist/assets/PeopleRoutes-Cve6HQco.js +0 -22
- package/dist/assets/PerformanceRoutes-Dc2aDfOC.js +0 -1
- package/dist/assets/ReferralListScreen-DY3Jq79H.js +0 -5
- package/dist/assets/RewardsRoutes-BE91uGyY.js +0 -1
- package/dist/assets/SignInScreen-CCSmRNKI.js +0 -1
- package/dist/assets/SignOutScreen-04tDb2m_.js +0 -9
- package/dist/assets/TaskRoutes-UAlOA4bQ.js +0 -9
- package/dist/assets/WiseConfirmationScreen-ufjg25Ux.js +0 -12
- package/dist/assets/getLocaleForTenant-BKUl3rU_.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Cu0cLXsh.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-DQxWCA7d.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-yFsVWhao.js";import{L as dt,bT as Tc,eR as Ac,JY as Rc,Kq as kl,c1 as Tl,fp as Al,fq as Rl}from"./zeni-epic-state-Co_KJ39L.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-CaIGWeOv.js";import{r as un}from"./empty-DWXN0zXu.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-Bunmyp1f.js";import{r as Gl}from"./index-D6SI2XXD.js";import{r as zl}from"./index-D8lrtix7.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-yFUZRhgi.js";import{u as Kl,z as Pc,L as Wl,C as Jl,F as Xl,h as Ql,d as tf}from"./index-jqYKktfd.js";import"./mui-ChC8whdU.js";import{d as Pe}from"./decodeURIComponentSafe-DJGiVKY3.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]="8b2e3ec3-da58-49a7-9045-c2a7a61618fc",t._sentryDebugIdIdentifier="sentry-dbid-8b2e3ec3-da58-49a7-9045-c2a7a61618fc")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-DQxWCA7d.js";import{a as o}from"./sentry-yFsVWhao.js";import{j as f,h as L,u as N,g as F,n as V}from"./core-yFUZRhgi.js";import{m as W,J as U,z as R,bb as _,y as M,U as $,W as z,v as J,d as l,f as q,a7 as G,bc as K}from"./index-jqYKktfd.js";import{f4 as Q,eR as X,Ng as I,Nh as Y,uI as Z,uy as g,f6 as ee,bO as re,uD as ae,Ni as ne}from"./zeni-epic-state-Co_KJ39L.js";import{D as te,e as se,n as oe,S as ie}from"./mui-ChC8whdU.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-CVkVwVMM.js";import{M as de}from"./MobileAppDrawer-CrgnLvLU.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]="3802be79-f07d-4084-a75b-d6d7e70ce82f",e._sentryDebugIdIdentifier="sentry-dbid-3802be79-f07d-4084-a75b-d6d7e70ce82f")}catch{}})();const ce={overlayWidth:new M(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=W(),n=U();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>Q(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(_,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,P="refer-and-earn-status-update",we=V(function(e){const r=I(e),a=e.referralViewState.rewardsPlanFetchState,n=re([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(ae(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(G(K));function ve({isReferralDrawerOpen:e}){const r=L(),a=N(),n=F(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>X(t)),m=f(t=>I(t)),b=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=Y([m,p]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(a(Z()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),a(g(!0)))},[b,a,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(x(!0),a(ee(!0)))},[p,a,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const O={events:w?.userId!=null?[`private-encrypted-${w.userId}.${P}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(J,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(q.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:r,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...O})]})}export{ve as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-DQxWCA7d.js";import x from"./NotFoundScreen-v5_de3EY.js";import{a as p}from"./sentry-yFsVWhao.js";import{h as D,g as I,u as C,j as d,N as A,n as E,o as k,p as u}from"./core-yFUZRhgi.js";import{eR as O,Oa as g,Oq as S,DF as T,CO as V,DE as c,Dv as U,OH as _}from"./zeni-epic-state-Co_KJ39L.js";import{m as $,z as B,B as N,a7 as W,bS as q,af as z}from"./index-jqYKktfd.js";import"./mui-ChC8whdU.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-CVwi5aJZ.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]="a522c417-8ff2-4ed2-877b-db9d857bd629",e._sentryDebugIdIdentifier="sentry-dbid-a522c417-8ff2-4ed2-877b-db9d857bd629")}catch{}})();const m="reimbursement-approval-rule-update",F=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(m)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(c(s)),a(`./${s}/edit`)):(e(c()),a("./new"))}}})(W(q)),H=()=>{const e=D(),r=I(),a=C(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=d(n=>n.remiSetupApproverViewState.fetchState),o=d(n=>O(n)),w=$(),i=d(n=>g(n)),v=d(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&a(T())},[v]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(V(!0)))},[l,b,a]),B.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(c())),e("./new"))},[f,i,a]);const R={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${m}`]:[],eventCallback:(n,P,j)=>{n.endsWith(m)&&j.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...R})};function Z(){return t.jsxs(k,{children:[t.jsx(u,{path:"/",element:t.jsx(H,{})}),t.jsx(u,{path:"/new",element:t.jsx(h,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(u,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-DQxWCA7d.js";import{a as y}from"./sentry-yFsVWhao.js";import{h as w,u as A,g as T,i as U,j as b,n as E}from"./core-yFUZRhgi.js";import{Oq as D,Oa as C,Dy as x,DH as _,DF as S,DG as h,Or as B}from"./zeni-epic-state-Co_KJ39L.js";import{z as O,m as k,B as V,bJ as F,af as j}from"./index-jqYKktfd.js";import"./mui-ChC8whdU.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]="718e0c52-0545-412d-b057-3d7ecb2809a1",e._sentryDebugIdIdentifier="sentry-dbid-718e0c52-0545-412d-b057-3d7ecb2809a1")}catch{}})();function $(e){return B(e)==null}const N=E(function(e,a){const t=D(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=j(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const v=[];return p.forEach(c=>{const R=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=R.concat(I);v.push({action:c.stepType.selectedOption,actors:m,operator:m.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(h(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(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function L(){const e=w(),a=A(),t=T(),{approvalRuleId:s}=U(),n=O.getSignedInUser(),l=k(),r=b(p=>D(p)),i=b(p=>C(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(V,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(N,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{L as R,$ as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DpbFof4_.js";import{h as J,u as re,g as Z,i as K,j as E,N as M,n as q,l as mt,o as ct,p as C}from"./core-BYU75o8V.js";import{eR as V,OI as le,c1 as me,CJ as Be,jT as dt,CW as ne,CV as ae,OJ as ut,bn as ce,fO as De,OK as pt,L3 as bt,jI as Te,L4 as Se,L5 as gt,iD as ht,NY as ft,iS as St,Cx as It,tc as yt,iK as Rt,Dh as je,OL as Fe,OM as At,ON as kt,OO as vt,OP as Ct,OQ as Et,D1 as Ie,iY as wt,O5 as xt,CX as Bt,CH as Dt,OR as Tt,CG as jt,OS as Ft,CP as ye,D5 as Ut,D4 as Lt,D0 as Pt,OT as Ue,Ie as Ot,bq as $t,CS as Mt,Dz as _t,OU as Nt,OV as zt,Dd as Gt,Da as Re,Nr as Ht,CE as Zt,OW as Le,DY as Ae,E4 as Vt,OX as Wt,OY as G,OZ as Jt,O_ as Pe,O$ as qt,P0 as Oe,P1 as $e,Dp as se,bu as Xt,bG as de,cB as ue,f0 as Me,e_ as _e,P2 as Yt,gV as Kt,NE as Qt,P3 as en,P4 as Ne,NI as tn,Oq as nn,P5 as an,OH as sn,E1 as ke,E0 as on,P6 as rn,P7 as ln,P8 as mn,P9 as cn,Pa as dn,Ob as un,DT as pn,DX as bn,bs as gn,bF as hn,cw as fn,ck as Sn,bt as In,J_ as yn,cL as Rn,cN as An,cM as kn,cv as vn}from"./zeni-epic-state-De2ZE3v5.js";import{w as ze,J as Ge,a as Q,G as k,z as O,bT as He,y as ee,e as v,aH as ve,o as j,at as Y,H as Cn,D as Ze,bU as En,s as H,_ as Ve,bV as wn,k as te,bW as xn,W as Bn,E as Dn,B as pe,g as We,a7 as Tn,bk as jn,a2 as Fn,m as Je,bX as Un,a9 as Ln}from"./index-CTd0IcDC.js";import{n as _,S as Pn}from"./mui-CaUmS2In.js";import ie from"./NotFoundScreen-DTlzuW8g.js";import{S as Ce}from"./SetupPagesScreen-UbKhsOme.js";import{F as qe}from"./FeaturePreviewScreen-FqmwbgK1.js";import{a as f}from"./sentry-B2BY3pFv.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-Cu0cLXsh.js";import{u as Xe}from"./useInitialThreadRequest-jFDMxuZj.js";import{D as On}from"./DrawerScreen-TcF0aKWR.js";import{M as Ye}from"./MobileAppDrawer-KB2L4yYh.js";import{R as $n}from"./ReimbursementApprovalRoutes-Dd6B4kce.js";import{FallBackRoute as Mn}from"./ScreenRoutes-Bt5RxjsW.js";import"./recharts-eaz7OFOH.js";import"./analytics-DW163hO6.js";import"./plaid-EPzkqVUX.js";import"./dnd-BzfEm7I9.js";import"./stripe-DMRn4zHo.js";import"./lottie-DkmqGRq5.js";import"./lexical-a4Oisgnk.js";import"./pdf-Bp96SSrk.js";import"./utils-w1fZp2Am.js";import"./analyticsHelper-C1JBjAI6.js";import"./routePaths-DtPkVCZ8.js";import"./BusinessVerificationPageScreen-BK-kRDjQ.js";import"./ReimbursementApprovalRuleDetailScreen-BLwUi-7g.js";import"./getLocaleForTenant-BKUl3rU_.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]="d4a2bc57-a321-444e-9ad6-282ad94274c2",e._sentryDebugIdIdentifier="sentry-dbid-d4a2bc57-a321-444e-9ad6-282ad94274c2")}catch{}})();const Ke=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),Nn=q(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=O.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=De(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const D=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:D,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Te(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=O.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Ke(o),l=H(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=J(),t=re(),n=Z(),{reimbursementId:r}=K(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Q(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:D,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=Z().pathname,T=w.includes("edit"),A=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=O.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),P=Xe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||T&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const $=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Hn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.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(Wn,{windowSize:c,children:s.jsx(Nn,{initialOpenThreadRequest:P??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:D,onAskAiCfoClick:u})})]})}const zn=_.div`
|
|
1
|
+
import{j as s}from"./liveblocks-DQxWCA7d.js";import{h as q,u as re,g as Z,i as K,j as E,N as M,n as J,l as mt,o as ct,p as C}from"./core-yFUZRhgi.js";import{eR as V,OI as le,c1 as me,CJ as Be,jT as dt,CW as ne,CV as ae,OJ as ut,bn as ce,fO as De,OK as pt,L3 as bt,jI as Te,L4 as Se,L5 as gt,iD as ht,NY as ft,iS as St,Cx as It,tc as yt,iK as Rt,Dh as je,OL as Fe,OM as At,ON as kt,OO as vt,OP as Ct,OQ as Et,D1 as Ie,iY as wt,O5 as xt,CX as Bt,CH as Dt,OR as Tt,CG as jt,OS as Ft,CP as ye,D5 as Ut,D4 as Lt,D0 as Pt,OT as Ue,Ie as Ot,bq as $t,CS as Mt,Dz as _t,OU as Nt,OV as zt,Dd as Gt,Da as Re,Nr as Ht,CE as Zt,OW as Le,DY as Ae,E4 as Vt,OX as Wt,OY as G,OZ as qt,O_ as Pe,O$ as Jt,P0 as Oe,P1 as $e,Dp as se,bu as Xt,bG as de,cB as ue,f0 as Me,e_ as _e,P2 as Yt,gV as Kt,NE as Qt,P3 as en,P4 as Ne,NI as tn,Oq as nn,P5 as an,OH as sn,E1 as ke,E0 as on,P6 as rn,P7 as ln,P8 as mn,P9 as cn,Pa as dn,Ob as un,DT as pn,DX as bn,bs as gn,bF as hn,cw as fn,ck as Sn,bt as In,J_ as yn,cL as Rn,cN as An,cM as kn,cv as vn}from"./zeni-epic-state-Co_KJ39L.js";import{Q as ze,J as Ge,a as Q,G as k,z as O,bT as He,v as ee,d as v,aH as ve,o as j,at as Y,A as Cn,D as Ze,bU as En,q as H,W as Ve,bV as wn,k as te,bW as xn,U as Bn,y as Dn,B as pe,f as We,a7 as Tn,bk as jn,a2 as Fn,m as qe,bX as Un,a9 as Ln}from"./index-jqYKktfd.js";import{n as _,S as Pn}from"./mui-ChC8whdU.js";import ie from"./NotFoundScreen-v5_de3EY.js";import{S as Ce}from"./SetupPagesScreen-BXETP8g-.js";import{F as Je}from"./FeaturePreviewScreen-qdJQX-H8.js";import{a as f}from"./sentry-yFsVWhao.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-CVkVwVMM.js";import{u as Xe}from"./useInitialThreadRequest-Ds4FzIV5.js";import{D as On}from"./DrawerScreen-COKN8vXf.js";import{M as Ye}from"./MobileAppDrawer-CrgnLvLU.js";import{R as $n}from"./ReimbursementApprovalRoutes-CbRVuJWF.js";import{FallBackRoute as Mn}from"./ScreenRoutes-BCcnBfC_.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.js";import"./analyticsHelper-De1N1-Zw.js";import"./routePaths-Bboudd1B.js";import"./BusinessVerificationPageScreen-BTZMu3mu.js";import"./ReimbursementApprovalRuleDetailScreen-CVwi5aJZ.js";import"./getLocaleForTenant-DYvzcoGq.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]="4591108b-a134-4ad1-8f91-d116f1392cc6",e._sentryDebugIdIdentifier="sentry-dbid-4591108b-a134-4ad1-8f91-d116f1392cc6")}catch{}})();const Ke=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),Nn=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=O.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=De(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const D=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:D,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Te(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=O.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Ke(o),l=H(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=q(),t=re(),n=Z(),{reimbursementId:r}=K(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Q(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:D,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=Z().pathname,T=w.includes("edit"),A=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=O.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),P=Xe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||T&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const $=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Hn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.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(Wn,{windowSize:c,children:s.jsx(Nn,{initialOpenThreadRequest:P??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:D,onAskAiCfoClick:u})})]})}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-DpbFof4_.js";import{h as J,u as re,g as Z,i as K
|
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,
|
|
56
|
+
`,qn=J(function(e,t){const n=Ue(e,t.reimbursementId),r=O.getSignedInUser(),d=ce(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Nt(n.remiActivities,zt(t.currentTenant),r));const i=me(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:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Te(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Fe());const a=Ke(o),i=H(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Ht({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Re(n,a.type,"")):e(Re(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=H(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(je(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(wn);function Jn(){const e=q(),t=re(),n=Z(),r=n.hash.substring(1),d=ze(),{reimbursementId:c}=K(),m=O.getSignedInUser(),o=E(y=>V(y)),a=E(y=>Ue(y,c??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=Xe(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=be({mobileExploreReferrer:"Reimbursement Details"});Ve({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=Q(),{isFeatureEnabled:D}=h(k.isLimitedCategoryForReimbursement),[u,w]=f.useState(!1),[T,A]=f.useState(!1),[F,x]=f.useState(!1),{isFeatureEnabled:B}=h(k.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(k.isShowDeletedReimbursementsFeatureEnabled),g=E(y=>le(y,c??"")),P=Ot(o),U=$t(o.userRole),$=a.fetchState;if(f.useEffect(()=>{u||c==null?u==1&&$==="Error"&&e("page-not-found",{replace:!0}):(w(!0),t(Mt(c,!1,I)))},[u,c,t,$]),f.useEffect(()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&P===!1?x(!1):x(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find(y=>y.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,P,m]),f.useEffect(()=>{T||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(A(!0),t(Be(!1,D,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(_t(!1,!0,!0,a.lastUpdatedByUserId)))},[T,a,c,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(M,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(He,{}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:y=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(y)}),s.jsx(qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:B,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:F,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:R})]})}const Xn=J(function(e,t){return{remisReviewView:Le(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(G())},onCloseReviewItem:n=>{e(Wt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Vt());break;case"approve":e(Ae("approved",r??""));break;case"reject":e(Ae("rejected",r??""))}}}})(xn);function Yn(){const e=q(),t=E(c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=E(c=>Le(c)),r=te(),d=r?.loggedInUserRole?.includes("admin")===!0;return f.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(Xn,{navigate:e,analytics:v,isAdmin:d})}const z=tn(),Qe="bulk-operation-update",oe="reimbursement-approval-rule-update",{spendManagement:Kn,common:we}=Ze.getLocalizedStrings(),xe=Kn.reimbursement.bulkActions,Qn=_.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
min-height: 100%;
|
|
59
59
|
width: 100%;
|
|
@@ -61,8 +61,8 @@ import{j as s}from"./liveblocks-DpbFof4_.js";import{h as J,u as re,g as Z,i as K
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ea=
|
|
64
|
+
`,ea=J(function(e,t){const n=$e(e,z,t.isBulkActionEnabled);let r=n.allSubTabs;const d=O.getSignedInUser(),c=ce(d),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,R=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:z,spendManagementEndPoint:`${Fn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:R.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(G()),e(Pe(o))},onSubtabChange:o=>{e(G()),e(Oe(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=H(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=H(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=H(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(se(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(G())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(ke("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(ke("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(oe)&&e(sn(!1))},onEventReceived:o=>{o===Qe&&e(an())}}})(Tn(jn));function ta(){const e=q(),t=re(),n=Z(),r=n.state,d=Ge(),[c,m]=f.useState(null),o=mt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect(()=>{if(r?.tab!=null&&r?.subTab!=null){const S=qt(r.tab.toString());S!=null?t(Pe(S)):console.log("Warning:Not a valid remiListTab");const N=Jt(r.subTab.toString());N!=null?t(Oe(N)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(G())}},[]);const{useFeatureGate:a}=Q(),{isFeatureEnabled:i}=a(k.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(k.isBillPayCommentingEnabled),{isFeatureEnabled:R}=a(k.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(k.isReimbursementBulkActionEnabled),D=O.getSignedInUser(),u=E(S=>V(S)),[w,T]=f.useState(!1),[A,F]=f.useState(!1),x=te(),B=x?.loggedInUserRole?.includes("admin")===!0,I=E(S=>$e(S,z,h)),{areTenantIdsInSync:g}=Bn(),P=I.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:$}=be({mobileExploreReferrer:"Reimbursement List"});if(Ve({isDataReady:P==="Completed"}),f.useEffect(()=>{!A&&g&&(F(!0),t(se(z,!0,l,!1,!0)))},[A,z,t,g]),D==null)throw Error("Can't access address page without signing in...");const y=!!u?.userRole&&Xt(u),p=de(x?.loggedInUserRoleMap),W=ue(x?.loggedInUserRoleMap),et=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,tt=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,nt=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,at=E(S=>De(S.companyState,u.companyId)),st=at?.company.featuresActivationInfo.connectedAccountProvider,ge=S=>{T(S)},{isFeatureEnabled:it}=a(k.isDebitCardFeatureEnabled),ot=Me(it,u),rt=_e(u),{remisProcessed:X,remisProcessing:he}=E(S=>Yt(S));f.useEffect(()=>{X===he&&c!=null&&(t(Kt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:X>1?xe.reports:xe.report},{variableName:"_has_",variableValue:X>1?we.texts.have:we.texts.has},{variableName:"_action_",variableValue:Qt(c)}]})),t(en()),setTimeout(()=>{t(se(z,!0,l,!1,!0,!0))},3e3),m(null))},[X,he]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${Qe}`,`private-encrypted-${u.companyId}.${oe}`]:[],eventCallback:(S,N,fe)=>{S.endsWith(oe)?fe.onReimbursementApprovalRulesEventReceived?.(S):N.entity_type==="reimbursement"&&(m(N.operation_type),fe.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?ot===!0||rt===!0?s.jsx(Je,{}):tt&&(!y||p)||W&&et?s.jsxs(s.Fragment,{children:[P==="Completed"?s.jsx(ee,{analytics:v,onLoad:S=>(N=>N.trackPageLoaded(We.Event.reimbursementHome))(S)}):null,s.jsx(Ye,{isAppContentDrawerOpen:w,handleDrawerToggle:ge}),s.jsxs(Qn,{windowSize:d,children:[s.jsx(On,{isOpen:o,drawerLeftMargin:new Dn(0,0,300,600),onClose:()=>{e("./"),t(G())},children:s.jsx(sa,{onClick:S=>S.stopPropagation(),children:s.jsx(Yn,{})})}),s.jsx(ea,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:R,location:n,navigate:e,currentTenant:u,period:z,isAdmin:B,isEmployee:y,entity:"reimbursement",onClickMenuIcon:()=>{ge(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:st,isBulkActionEnabled:h,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:U,onAskAiCfoClick:$,...lt})]})]}):nt&&p?s.jsx(M,{to:"../setup"}):x!=null&&Ne(u,x.loggedInUserRoleMap)?s.jsx(M,{to:"../promo"}):s.jsx(pe,{fetchState:"In-Progress"}):s.jsx(ie,{})}const na=e=>`/${e}/reimbursements/setup`,aa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},sa=_(Pn)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
68
|
-
`,ia=
|
|
68
|
+
`,ia=J(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(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(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Un),oa=()=>{const e=q(),t=Z(),{tenantEmailDomain:n}=K(),r=qe(),[d,c]=f.useState(!1),m=E(A=>V(A)),o=O.getSignedInUserTenant(n)?.companyId??m.companyId,a=O.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),b=te(),R=de(b?.loggedInUserRoleMap),h=ue(b?.loggedInUserRoleMap),D=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,u=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,w=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,T=A=>{c(A)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return u&&h&&D?s.jsx(M,{to:"../../../reimbursements"}):w&&R?s.jsx(M,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!w||m.userReimbursementInfo&&h&&D===!1?s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:A=>(F=>F.trackPageLoaded(We.Event.reimbursementPromoPage))(A)}),s.jsx(Ye,{isAppContentDrawerOpen:d,handleDrawerToggle:T}),s.jsx(ia,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{T(!0)}})]}):s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Pa(){const e=E(W=>V(W)),t=te(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=qe(),d=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=Q(),{isFeatureEnabled:o}=m(k.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(k.isDebitCardFeatureEnabled),i=Me(a,e),l=_e(e),b=e?.userRole!=null&&gn(e?.userRole),R=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),h=fn(t?.loggedInUserRoleMap),D=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=de(t?.loggedInUserRoleMap),w=D&&u,{isFeatureEnabled:T}=m(k.isDepositAccountsFeatureEnabled),A=T&&!b&&Sn(t?.loggedInUserRoleMap),F=Ln(e,o,a)&&!b&&In(t?.loggedInUserRoleMap),x=yn(t?.loggedInUserRoleMap),B=Rn(t?.loggedInUserRoleMap),I=An(t?.loggedInUserRoleMap),g=kn(t?.loggedInUserRoleMap),P=vn(t?.loggedInUserRoleMap),U=ue(t?.loggedInUserRoleMap),{tenantEmailDomain:$}=K(),y=Z(),p=n===!0&&(u||U&&c);return s.jsxs(ct,{children:[y.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(C,{path:"verification",element:s.jsx(Ce,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"verification"})}),s.jsx(C,{path:"setup",element:s.jsx(Ce,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"setup"})}),s.jsx(C,{path:"promo",element:s.jsx(oa,{})}),s.jsx(C,{path:"approval-rules/*",element:w?s.jsx($n,{}):s.jsx(Mn,{isUserHasZeniAccountsAccess:B,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:P,isUserHasReimbursementAccess:U,isUserHasTreasuryAccess:I,isTenantBankingOnly:i,tenantEmailDomain:$??""})}),p&&s.jsx(C,{path:"*",element:s.jsx(ta,{})}),(i===!0||l===!0)&&s.jsx(C,{path:"/*",element:s.jsx(Je,{})}),t!=null&&Ne(e,t?.loggedInUserRoleMap)&&s.jsx(C,{path:"*",element:s.jsx(M,{to:"../promo"})}),d&&u&&s.jsx(C,{path:"*",element:s.jsx(M,{to:"../setup"})})]}):y.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(C,{path:"new",element:s.jsx(Ee,{})}),s.jsx(C,{path:":reimbursementId",element:s.jsx(Jn,{})}),s.jsx(C,{path:":reimbursementId/edit",element:s.jsx(Ee,{})}),s.jsx(C,{path:"*",element:s.jsx(ie,{})})]}):s.jsx(C,{path:"*",element:s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(C,{path:"*",element:s.jsx(ie,{})})]})}export{Pa as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-DpbFof4_.js";import{g as z,h as ge,u as Ce,i as Ie,j as d,n as we,o as Se,p as G}from"./core-BYU75o8V.js";import{eR as M,ff as I,Kr as Re,jI as J,p_ as Z,qP as F,jw as Te,iA as Ae,uc as X,qU as Oe,bs as Fe,Ks as ke,bn as De,vl as je,Kt as Ee,Ku as Pe,u4 as Le,Kv as H,Kw as Me,Kx as ve,Ky as Be,Kz as Ke,KA as w,KB as k,KC as D,KD as Y,KE as j,KF as E,dE as Ue,v1 as Ve,uR as N,uS as q,v7 as xe,uW as $,vd as ze,KG as Ge,KH as He,KI as Ye,KJ as Ne,KK as qe,f0 as $e,e_ as Qe}from"./zeni-epic-state-De2ZE3v5.js";import{Q as We,R as Je,U as Ze,V as Xe,J as ea,a as ee,G as P,z as ae,W as aa,k as sa,c as ta,Y as oa,_ as na,y as ra,e as L,g as ia,$ as la,s as se,a0 as ca,a1 as da,a2 as pa}from"./index-CTd0IcDC.js";import"./mui-CaUmS2In.js";import fa from"./NotFoundScreen-DTlzuW8g.js";import{F as ma}from"./FeaturePreviewScreen-FqmwbgK1.js";import{a as _}from"./sentry-B2BY3pFv.js";import{u as ua}from"./useInitialThreadRequest-jFDMxuZj.js";import{t as Q,a as W,b as _a}from"./routePaths-DtPkVCZ8.js";import{M as ha}from"./MobileAppDrawer-KB2L4yYh.js";import"./recharts-eaz7OFOH.js";import"./analytics-DW163hO6.js";import"./plaid-EPzkqVUX.js";import"./dnd-BzfEm7I9.js";import"./stripe-DMRn4zHo.js";import"./lottie-DkmqGRq5.js";import"./lexical-a4Oisgnk.js";import"./pdf-Bp96SSrk.js";import"./utils-w1fZp2Am.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]="7fea5734-4964-4fa4-8a3f-fe7262bb9222",e._sentryDebugIdIdentifier="sentry-dbid-7fea5734-4964-4fa4-8a3f-fe7262bb9222")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(He()),e(Ye()),e(Ne()),e(qe())},ga=we(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=ke(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:L,isZeniUser:De(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:Z(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(D({scrollPosition:s}));break;case"cash_flow":e(k({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ke({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(ve({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Le()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),f=ea(),u=da(f),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(P.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[v,te]=_.useState(!1),{isFeatureEnabled:B}=l(P.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const R=d(n=>M(n)),oe=R.masterTOSInfo?.isMasterTOSAccepted??!1,ne=R.company?.companyInfo.firstMonthOfFY??1,re=ua(B?R?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Re(n)),{areTenantIdsInSync:h}=aa(),T=d(n=>n.financeStatementState.selectedReportId),K=d(n=>J(n)),A=d(n=>Z(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(F(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!v&&C==="Completed"&&h&&(s(F(c.userId,!1,!0,!1)),te(!0))},[i,v,C,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":A&&s(X());break;case"balance_sheet":s(Ae(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,O,h,K,A]);const U=sa(),de=U?.loggedInUserRole!=null&&Fe(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),V=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=z(),x=We(he??"")==="reports",be=Je(_e),ye=_.useMemo(()=>x?ba:void 0,[x]);Ze({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:L,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:V}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:T,analytics:L,filter:b,isAccountingClassesEnabled:K,isAccountingProjectsEnabled:A,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:V,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function xa(){const e=d(s=>M(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=$e(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(Ca,{})}),p.jsx(G,{path:"*",element:p.jsx(fa,{})})]})}export{xa as default};
|
|
1
|
+
import{j as p}from"./liveblocks-DQxWCA7d.js";import{g as z,h as ge,u as Ce,i as Ie,j as d,n as we,o as Se,p as G}from"./core-yFUZRhgi.js";import{eR as v,ff as I,Kr as Te,jI as J,p_ as Q,qP as F,jw as Re,iA as Ae,uc as X,qU as Oe,bs as Fe,Ks as ke,bn as De,vl as je,Kt as Ee,Ku as Pe,u4 as Me,Kv as H,Kw as ve,Kx as Le,Ky as Be,Kz as Ke,KA as w,KB as k,KC as D,KD as Y,KE as j,KF as E,dE as Ue,v1 as Ve,uR as N,uS as q,v7 as xe,uW as $,vd as ze,KG as Ge,KH as He,KI as Ye,KJ as Ne,KK as qe,f0 as $e,e_ as We}from"./zeni-epic-state-Co_KJ39L.js";import{H as Ze,I as Je,M as Qe,N as Xe,J as ea,a as ee,G as P,z as ae,U as aa,k as sa,c as ta,V as oa,W as na,v as ra,d as M,f as ia,$ as la,q as se,a0 as ca,a1 as da,a2 as pa}from"./index-jqYKktfd.js";import"./mui-ChC8whdU.js";import fa from"./NotFoundScreen-v5_de3EY.js";import{F as ma}from"./FeaturePreviewScreen-qdJQX-H8.js";import{a as _}from"./sentry-yFsVWhao.js";import{u as ua}from"./useInitialThreadRequest-Ds4FzIV5.js";import{t as W,a as Z,b as _a}from"./routePaths-Bboudd1B.js";import{M as ha}from"./MobileAppDrawer-CrgnLvLU.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.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]="4f7bf1bf-c5f8-4d83-8265-af2fcd64b409",e._sentryDebugIdIdentifier="sentry-dbid-4f7bf1bf-c5f8-4d83-8265-af2fcd64b409")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(He()),e(Ye()),e(Ne()),e(qe())},ga=we(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=ke(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:M,isZeniUser:De(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:Q(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return W(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Z(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(D({scrollPosition:s}));break;case"cash_flow":e(k({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ke({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Me()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),f=ea(),u=da(f),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(P.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(P.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>v(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),K=d(n=>J(n)),A=d(n=>Q(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(F(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!L&&C==="Completed"&&h&&(s(F(c.userId,!1,!0,!1)),te(!0))},[i,L,C,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":A&&s(X());break;case"balance_sheet":s(Ae(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,K,A]);const U=sa(),de=U?.loggedInUserRole!=null&&Fe(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),V=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=z(),x=Ze(he??"")==="reports",be=Je(_e),ye=_.useMemo(()=>x?ba:void 0,[x]);Qe({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:M,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:V}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:M,filter:b,isAccountingClassesEnabled:K,isAccountingProjectsEnabled:A,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:V,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function xa(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=$e(f,e),a=We(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(Ca,{})}),p.jsx(G,{path:"*",element:p.jsx(fa,{})})]})}export{xa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-DQxWCA7d.js";import{a as x,z as w,aN as y,v as E,d as p,f as R,cQ as F,G as L}from"./index-jqYKktfd.js";import"./mui-ChC8whdU.js";import l from"./NotFoundScreen-v5_de3EY.js";import{a as d}from"./sentry-yFsVWhao.js";import{u as P,j as b,h as T,g as V,n as U,o as z,p as u}from"./core-yFUZRhgi.js";import{eR as A,Rg as C,NR as G,Rh as v,uI as Y,f6 as O,Ri as Q,uG as q}from"./zeni-epic-state-Co_KJ39L.js";import{R as j}from"./ReferralListScreen-DuGf9HFb.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.js";import"./useAskAiCfoHostNavButtonProps-CVkVwVMM.js";import"./MobileAppDrawer-CrgnLvLU.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]="bef79dab-fe6d-4237-a871-9562c7e67a0d",e._sentryDebugIdIdentifier="sentry-dbid-bef79dab-fe6d-4237-a871-9562c7e67a0d")}catch{}})();const B=U(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(v()),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(q())},onUpdateInviteFormLocalData:s=>{e(Q({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(F),H=()=>{const e=P(),[t,n]=d.useState(!1),[o,s]=d.useState(!1),r=b(i=>A(i)),c=T(),N=V(),{useDynamicConfig:g}=x(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),_=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:k}=g(y.zeniAccountsConfig),D=G(k);d.useEffect(()=>{e(v()),r?.rewardsLastViewedTime==null&&o===!1&&(e(Y()),s(!0))},[]),d.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(O(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(S=>S.trackPageLoaded(R.Event.inviteEmailViewed))(i)}):null,a.jsx(B,{navigate:c,location:N,currentTenant:r,companyName:I,userName:_,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(z,{children:[a.jsx(u,{path:"/",element:t?a.jsx(j,{}):a.jsx(l,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(j,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(H,{}):a.jsx(l,{})}),a.jsx(u,{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 ts,eR as is,f0 as rs,e_ as os,e$ as ls,fJ as cs,eV as ds,cO as pe,cw as ms,fg as us,co as _s,bE as As,bo as ps,fl as Es,v as gs,JZ as Is,bs as Ts,J_ as xs,bG as hs,fi as js,bF as Us,bt as Rs,ck as bs,J$ as Hs,K0 as Ds,cL as ys,cN as fs,cM as Cs,cv as vs,cB as Os,ng as Ee,eY as ge,fT as Ps,fp as Ie,fQ as Te,fR as xe,fq as Fs}from"./zeni-epic-state-De2ZE3v5.js";import{j as e}from"./liveblocks-DpbFof4_.js";import{a as v}from"./sentry-B2BY3pFv.js";import{u as Ls,h as Bs,i as ks,g as Vs,j as G,l as he,N as c,o as Ss,p as t}from"./core-BYU75o8V.js";import{m as Ns,u as Ms,z as b,a as Zs,c as ws,d as Gs,G as k,k as $s,L as F,D as je,t as _,P as zs,e as Q,l}from"./index-CTd0IcDC.js";import"./mui-CaUmS2In.js";import{f as Ue}from"./analyticsHelper-C1JBjAI6.js";import{t as Ys}from"./getLocaleForTenant-BKUl3rU_.js";import"./recharts-eaz7OFOH.js";import"./analytics-DW163hO6.js";import"./plaid-EPzkqVUX.js";import"./dnd-BzfEm7I9.js";import"./stripe-DMRn4zHo.js";import"./lottie-DkmqGRq5.js";import"./lexical-a4Oisgnk.js";import"./pdf-Bp96SSrk.js";import"./utils-w1fZp2Am.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]="a20a87b6-2e0f-43c5-bb31-ec3d0b9294cc",i._sentryDebugIdIdentifier="sentry-dbid-a20a87b6-2e0f-43c5-bb31-ec3d0b9294cc")}catch{}})();const Js={dashboard:()=>n(()=>import("./DashboardRoutes-DKnI8ITO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-AaRkKbnn.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-BtesSDuB.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-BFm1xRNi.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-d9SQJouF.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-Ypov_XRg.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-CNTdAWSK.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-Cve6HQco.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-Bk7qpJQq.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-BQeFHsY5.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-BCP9sJSY.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-OW53QlAG.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],X=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Ws=l(()=>n(()=>import("./ReportsRoutes-Ypov_XRg.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),Ks=l(()=>n(()=>import("./AddressRoutes-CfeuS_Ag.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),Qs=l(()=>n(()=>import("./PeopleRoutes-Cve6HQco.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),Xs=l(()=>n(()=>import("./PandLWithForecastRoutes-DuUVhGFv.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),en=l(()=>n(()=>import("./CustomerOnboardingRoutes-2jxeCtoH.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),sn=l(()=>n(()=>import("./VendorsRoutes-BCP9sJSY.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),nn=l(()=>n(()=>import("./TransactionDetailRoutes-DIIsxXoI.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Re=l(()=>n(()=>import("./EntityDetailRoutes-Ck3_JPiA.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),an=l(()=>n(()=>import("./DashboardRoutes-DKnI8ITO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),be=l(()=>n(()=>import("./BillPayRoutes-AaRkKbnn.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),tn=l(()=>n(()=>import("./SettingsRoutes-d9SQJouF.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),He=l(()=>n(()=>import("./ReimbursementRoutes-BtesSDuB.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),rn=l(()=>n(()=>import("./ZeniAccountRoutes-OW53QlAG.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),on=l(()=>n(()=>import("./TreasuryRoutes-BQeFHsY5.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),ln=l(()=>n(()=>import("./TransactionListRoutes-BFm1xRNi.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),cn=l(()=>n(()=>import("./ChargeCardRoutes-CNTdAWSK.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),dn=l(()=>n(()=>import("./NotificationRoutes-CUoWsLW6.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),mn=l(()=>n(()=>import("./PerformanceRoutes-Dc2aDfOC.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),un=l(()=>n(()=>import("./ExpenseAutomationRoutes-Bk7qpJQq.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),_n=l(()=>n(()=>import("./RewardsRoutes-BE91uGyY.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),An=l(()=>n(()=>import("./TaskRoutes-UAlOA4bQ.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),pn=l(()=>n(()=>import("./AiCfoScreen-CNSskoeK.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-DTlzuW8g.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),En=l(()=>n(()=>import("./TaskListScreen-yP29eLKe.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function Nn({setTenantEmailDomain:i}){const U=Ls(),V=Bs(),{tenantEmailDomain:o}=ks(),S=Ns().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Ms(),D=b.getSignedInUserTenant(o)?.tenantId,h=b.getSignedInUser(),ee=ts(h),$=Vs(),[N,ye]=v.useState(!1),r=G(a=>is(a)),{useFeatureGate:L}=Zs(),W=ws(),se=Gs(),{isFeatureEnabled:fe}=L(k.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ce}=L(k.isTreasuryEnabled),{isFeatureEnabled:ve}=L(k.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=L(k.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),p=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||j==="Completed"?rs(ne,r):void 0,z=p==="Completed"||j==="Completed"?os(r):void 0,Oe=p==="Completed"||j==="Completed"?ls(r):void 0,Pe=ve||ne||!!Oe||!!z||!!u,{isFeatureEnabled:Fe}=L(k.isSettingsFeatureEnabled),{isFeatureEnabled:Le}=L(k.isAiCfoFileUploadEnabled),Y=G(a=>cs(a));if(o!=null){const a=b.getSignedInUserTenant(o);h!=null&&a!=null&&Ue(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ae=ds(),A=$s(),Be=r.company==null||A?.loggedInUserRoleMap!=null&&pe(A.loggedInUserRole),ke=ms(A?.loggedInUserRoleMap),te=v.useRef(!0),ie=he("/:tenantEmailDomain/onboarding/*")!==null,K=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ve=G(a=>w.tenantId!=null?us(a,w.tenantId):void 0);v.useEffect(()=>{f(F.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&D!=null){const a=K.params.selectedPeriod;if(a!=null){const R=a.split("-");if(R.length===2){const d=_s(Number(R[0])),s=Number(R[1]),m=As(`01-${d<10?`0${d}`:d}-${s}`,je.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=ps();m.isAfter(M,"month")===!1?U(Es(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,D]),v.useEffect(()=>{N||(ye(!0),f(F.TENANT_FETCHING)),te.current?te.current=!1:!gs(ae,w)&&b.isSignedIn()&&(f(F.TENANT_FETCHING),function(a,R,d,s){if(ge(R?.userId,R?.zeniSessionId,a.tenantId),d(Ps(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=b.getSignedInUserTenantWithId(a.tenantId);s&&je.updateAppLocaleID(Ys(s)),m?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?Q.identify(a.userId,{tenant_id:a.tenantId}):Q.resetUserIdentity()}(w,h,U,Ve))},[w,ae,h,U,b]),v.useEffect(()=>{b.isSignedIn()&&(f(F.TENANT_FETCHING),function(a,R,d,s,m,M,B){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const J=s!=null&&m?.zeniSessionId!=null,ss=d==null||d.tenantId!==s,ns=d!=null&&d.excludedResources==null,as=d!=null&&d.externalConnections==null;if(J&&ss){B(Ie(s));const q=b.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(q?.tenantEmailDomain),ge(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(xe(m.userId,s)))}else J&&ns&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),J&&as&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(xe(m.userId,s)));if(J){Q.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(R==="Completed"||R==="Error");a==="Completed"||R!=="Not-Started"&&R!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(F.TENANT_FETCHING),B(Fs(m.userId,s,m.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(Ee(m.userId,m.zeniSessionId)))}}(j,p,r,D,h,f,U))},[D,p]),v.useEffect(()=>{b.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(F.TENANT_FETCHING),b.saveSignedInUserTenants(Is(Y.tenantsBaseInOrder)),h!=null&&Ue(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{p==="In-Progress"&&f(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(F.TENANT_FETCHING),Z(F.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[p,j,D,N]);const re=v.useRef(!1);v.useEffect(()=>{!re.current&&p==="Completed"&&N&&(re.current=!0,function(a=qs,R=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Js[m];M!=null?M().then(()=>X(()=>d(s+1))).catch(()=>X(()=>d(s+1))):d(s+1)};X(()=>d(0))},R)}())},[p,N]);const C=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Se}=L(k.isReferralFeatureEnabled),Ne=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Me=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),oe=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,le=Pe&&!C,Ze=xs(A?.loggedInUserRoleMap),we=r.externalConnections?.accounting[0]?.isValid,ce=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,me=de&&hs(A?.loggedInUserRoleMap),ue=fe&&!C,Ge=r.company!=null&&js(r.company),$e=Ce&&Ge===!0&&!C,ze=oe&&Us(A?.loggedInUserRoleMap),Ye=le&&Rs(A?.loggedInUserRoleMap),Je=ue&&bs(A?.loggedInUserRoleMap),qe=Hs(A?.loggedInUserRoleMap),We=Ds(A?.loggedInUserRoleMap),E=ys(A?.loggedInUserRoleMap),g=fs(A?.loggedInUserRoleMap),I=Cs(A?.loggedInUserRoleMap),T=vs(A?.loggedInUserRoleMap),x=Os(A?.loggedInUserRoleMap),_e=oe&&T,Ae=de&&x,Ke=ue&&E,Qe=$e&&g,Xe=le&&I,es=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||ke===!0||Ze===!0||qe===!0||We===!0;return b.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||j==="Completed"?(ce===!0||ee&&!ie)&&we===!1&&u===!1&&z===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||ce!==!1||ie||ee?N&&r?.userRole&&u!=null&&z!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Ss,{children:e.jsxs(t,{element:e.jsx(zs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(gn,{isDashboardAccess:P,isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:z})}),e.jsx(t,{path:"dashboard/*",element:P?e.jsx(an,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:P?e.jsx(Ws,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:es||P?e.jsx(Qs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:P?e.jsx(Xs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(en,{})}),e.jsx(t,{path:"transaction/*",element:P&&C===!1||Ne||Me?e.jsx(nn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:P&&C===!1?e.jsx(ln,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:P&&C===!1?e.jsx(Re,{entityType:"customer"}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:P&&C===!1?e.jsx(Re,{entityType:"vendor"}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(En,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(An,{})}),e.jsx(t,{path:"address/*",element:ze||me||Je||Ye?e.jsx(Ks,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:Ke?e.jsx(rn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:Qe?e.jsx(on,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:se===!0?e.jsx(mn,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:se===!0&&C===!1?e.jsx(un,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(dn,{})}),e.jsx(t,{path:"vendors/*",element:Be?e.jsx(sn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:_e?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:_e?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:Ae?e.jsx(He,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:Ae?e.jsx(He,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Fe?e.jsx(tn,{hasAdminLevelAccess:me}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:Xe?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Se?e.jsx(_n,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:W?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:W?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:W?e.jsx(pn,{isFileUploadEnabled:Le}):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:{...$.state,message:"...",origin:$.pathname}}))}const gn=({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"}),H=({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(xn,{tenantEmailDomain:O}):U?e.jsx(jn,{tenantEmailDomain:O}):V?e.jsx(Tn,{tenantEmailDomain:O}):o?e.jsx(In,{tenantEmailDomain:O}):e.jsx(y,{}),In=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),Tn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),xn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{H as FallBackRoute,Nn as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-GIiFG-1s.js","assets/sentry-yFsVWhao.js","assets/core-yFUZRhgi.js","assets/zeni-epic-state-Co_KJ39L.js","assets/index-jqYKktfd.js","assets/mui-ChC8whdU.js","assets/analytics-C--DBRuq.js","assets/utils-CaIGWeOv.js","assets/withTransactionSidePanel-Ufj2Gl6g.js","assets/useAskAiCfoHostNavButtonProps-CVkVwVMM.js","assets/TransactionDetailScreen-Cx8OkHWh.js","assets/decodeURIComponentSafe-DJGiVKY3.js","assets/routePaths-Bboudd1B.js","assets/NotFoundScreen-v5_de3EY.js","assets/useInitialThreadRequest-Ds4FzIV5.js","assets/analyticsHelper-De1N1-Zw.js","assets/CompanyPassportScreen-CflJgZzM.js","assets/MobileAppDrawer-CrgnLvLU.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BMRAWQ1G.js","assets/FeaturePreviewScreen-qdJQX-H8.js","assets/ReferralListScreen-DuGf9HFb.js","assets/index-R6GjjTB3.css","assets/BillPayRoutes-BU_8K1M6.js","assets/AddressScreen-DRkNCoFL.js","assets/DomesticWireDetailScreen-DQfmG0KY.js","assets/DrawerScreen-COKN8vXf.js","assets/SetupPagesScreen-BXETP8g-.js","assets/BusinessVerificationPageScreen-BTZMu3mu.js","assets/BillPayApprovalRoutes-BvU9483p.js","assets/ReimbursementApprovalRuleDetailScreen-CVwi5aJZ.js","assets/getLocaleForTenant-DYvzcoGq.js","assets/ReimbursementRoutes-D5yYUU5V.js","assets/ReimbursementApprovalRoutes-CbRVuJWF.js","assets/TransactionListRoutes-CPPEwrQh.js","assets/ZeniAccountStatementScreen-Bpoumjnq.js","assets/SettingsRoutes-B9LjzWe2.js","assets/accountMappingHelper-DcHRTvHW.js","assets/QBOConnectionScreen-BgQQew_6.js","assets/empty-DWXN0zXu.js","assets/index-D6SI2XXD.js","assets/url-CItc7ZnZ.js","assets/index-D8lrtix7.js","assets/ReportsRoutes-D75uQqxz.js","assets/ChargeCardRoutes-Xtry7c49.js","assets/PeopleRoutes-DS3elLhn.js","assets/ExpenseAutomationRoutes-B65oMKGx.js","assets/TreasuryRoutes-BPDk9A8T.js","assets/VendorsRoutes-7Qv63VB1.js","assets/pathToGoBack-48OEEFN8.js","assets/ZeniAccountRoutes-jdmuBqTz.js","assets/AddressRoutes-ZPs03itT.js","assets/PandLWithForecastRoutes-_37Co_bv.js","assets/CustomerOnboardingRoutes-C_F3TxKa.js","assets/TransactionDetailRoutes-D7bsCiCx.js","assets/EntityDetailRoutes-BVL9ZAaH.js","assets/NotificationRoutes-P-83L_ys.js","assets/PerformanceRoutes-BkeJXfUd.js","assets/RewardsRoutes-fbazCSso.js","assets/TaskRoutes-CdtXHU0-.js","assets/TaskListScreen-DMtc09u5.js","assets/AiCfoScreen-D-u8ipUi.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n,bn as ts,eR as is,f0 as rs,e_ as os,e$ as ls,fJ as cs,eV as ds,cO as pe,cw as ms,fg as us,co as _s,bE as As,bo as ps,fl as Es,v as gs,JZ as Is,bs as Ts,J_ as xs,bG as hs,fi as js,bF as Us,bt as Rs,ck as Hs,J$ as Ds,K0 as fs,cL as ys,cN as bs,cM as Cs,cv as vs,cB as Os,ng as Ee,eY as ge,fT as Ps,fp as Ie,fQ as Te,fR as xe,fq as Fs}from"./zeni-epic-state-Co_KJ39L.js";import{j as e}from"./liveblocks-DQxWCA7d.js";import{a as v}from"./sentry-yFsVWhao.js";import{u as Ls,h as Bs,i as ks,g as Vs,j as G,l as he,N as c,o as Ss,p as t}from"./core-yFUZRhgi.js";import{m as Ns,u as Ms,z as H,a as Zs,c as ws,_ as Gs,G as k,k as $s,L as F,D as je,t as _,P as zs,d as Q,l}from"./index-jqYKktfd.js";import"./mui-ChC8whdU.js";import{f as Ue}from"./analyticsHelper-De1N1-Zw.js";import{t as Ys}from"./getLocaleForTenant-DYvzcoGq.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.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]="d5ca503a-ff76-4da7-a547-4fa8e3a88d6c",i._sentryDebugIdIdentifier="sentry-dbid-d5ca503a-ff76-4da7-a547-4fa8e3a88d6c")}catch{}})();const Js={dashboard:()=>n(()=>import("./DashboardRoutes-GIiFG-1s.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-BU_8K1M6.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-D5yYUU5V.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-CPPEwrQh.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-B9LjzWe2.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-D75uQqxz.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-Xtry7c49.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-DS3elLhn.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-B65oMKGx.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-BPDk9A8T.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-7Qv63VB1.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-jdmuBqTz.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],X=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Ws=l(()=>n(()=>import("./ReportsRoutes-D75uQqxz.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),Ks=l(()=>n(()=>import("./AddressRoutes-ZPs03itT.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),Qs=l(()=>n(()=>import("./PeopleRoutes-DS3elLhn.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),Xs=l(()=>n(()=>import("./PandLWithForecastRoutes-_37Co_bv.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),en=l(()=>n(()=>import("./CustomerOnboardingRoutes-C_F3TxKa.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),sn=l(()=>n(()=>import("./VendorsRoutes-7Qv63VB1.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),nn=l(()=>n(()=>import("./TransactionDetailRoutes-D7bsCiCx.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Re=l(()=>n(()=>import("./EntityDetailRoutes-BVL9ZAaH.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),an=l(()=>n(()=>import("./DashboardRoutes-GIiFG-1s.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),He=l(()=>n(()=>import("./BillPayRoutes-BU_8K1M6.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),tn=l(()=>n(()=>import("./SettingsRoutes-B9LjzWe2.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),De=l(()=>n(()=>import("./ReimbursementRoutes-D5yYUU5V.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),rn=l(()=>n(()=>import("./ZeniAccountRoutes-jdmuBqTz.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),on=l(()=>n(()=>import("./TreasuryRoutes-BPDk9A8T.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),ln=l(()=>n(()=>import("./TransactionListRoutes-CPPEwrQh.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),cn=l(()=>n(()=>import("./ChargeCardRoutes-Xtry7c49.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),dn=l(()=>n(()=>import("./NotificationRoutes-P-83L_ys.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),mn=l(()=>n(()=>import("./PerformanceRoutes-BkeJXfUd.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),un=l(()=>n(()=>import("./ExpenseAutomationRoutes-B65oMKGx.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),_n=l(()=>n(()=>import("./RewardsRoutes-fbazCSso.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),An=l(()=>n(()=>import("./TaskRoutes-CdtXHU0-.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),pn=l(()=>n(()=>import("./AiCfoScreen-D-u8ipUi.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-v5_de3EY.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),En=l(()=>n(()=>import("./TaskListScreen-DMtc09u5.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function Nn({setTenantEmailDomain:i}){const U=Ls(),V=Bs(),{tenantEmailDomain:o}=ks(),S=Ns().mode,{setLoading:b,clearAllLoading:O,clearLoading:Z}=Ms(),f=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),ee=ts(h),$=Vs(),[N,ye]=v.useState(!1),r=G(a=>is(a)),{useFeatureGate:L}=Zs(),W=ws(),se=Gs(),{isFeatureEnabled:be}=L(k.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ce}=L(k.isTreasuryEnabled),{isFeatureEnabled:ve}=L(k.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=L(k.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),p=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||j==="Completed"?rs(ne,r):void 0,z=p==="Completed"||j==="Completed"?os(r):void 0,Oe=p==="Completed"||j==="Completed"?ls(r):void 0,Pe=ve||ne||!!Oe||!!z||!!u,{isFeatureEnabled:Fe}=L(k.isSettingsFeatureEnabled),{isFeatureEnabled:Le}=L(k.isAiCfoFileUploadEnabled),Y=G(a=>cs(a));if(o!=null){const a=H.getSignedInUserTenant(o);h!=null&&a!=null&&Ue(h,r,S)}const w={tenantId:f,userId:h?.userId,sessionId:h?.zeniSessionId},ae=ds(),A=$s(),Be=r.company==null||A?.loggedInUserRoleMap!=null&&pe(A.loggedInUserRole),ke=ms(A?.loggedInUserRoleMap),te=v.useRef(!0),ie=he("/:tenantEmailDomain/onboarding/*")!==null,K=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ve=G(a=>w.tenantId!=null?us(a,w.tenantId):void 0);v.useEffect(()=>{b(F.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&f!=null){const a=K.params.selectedPeriod;if(a!=null){const R=a.split("-");if(R.length===2){const d=_s(Number(R[0])),s=Number(R[1]),m=As(`01-${d<10?`0${d}`:d}-${s}`,je.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=ps();m.isAfter(M,"month")===!1?U(Es(f,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,f]),v.useEffect(()=>{N||(ye(!0),b(F.TENANT_FETCHING)),te.current?te.current=!1:!gs(ae,w)&&H.isSignedIn()&&(b(F.TENANT_FETCHING),function(a,R,d,s){if(ge(R?.userId,R?.zeniSessionId,a.tenantId),d(Ps(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=H.getSignedInUserTenantWithId(a.tenantId);s&&je.updateAppLocaleID(Ys(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?Q.identify(a.userId,{tenant_id:a.tenantId}):Q.resetUserIdentity()}(w,h,U,Ve))},[w,ae,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(b(F.TENANT_FETCHING),function(a,R,d,s,m,M,B){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const J=s!=null&&m?.zeniSessionId!=null,ss=d==null||d.tenantId!==s,ns=d!=null&&d.excludedResources==null,as=d!=null&&d.externalConnections==null;if(J&&ss){B(Ie(s));const q=H.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(q?.tenantEmailDomain),ge(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(xe(m.userId,s)))}else J&&ns&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),J&&as&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(xe(m.userId,s)));if(J){Q.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(R==="Completed"||R==="Error");a==="Completed"||R!=="Not-Started"&&R!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(F.TENANT_FETCHING),B(Fs(m.userId,s,m.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(Ee(m.userId,m.zeniSessionId)))}}(j,p,r,f,h,b,U))},[f,p]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(F.TENANT_FETCHING),H.saveSignedInUserTenants(Is(Y.tenantsBaseInOrder)),h!=null&&Ue(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{p==="In-Progress"&&b(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(O(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),Z(F.TENANT_FETCHING),Z(F.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[p,j,f,N]);const re=v.useRef(!1);v.useEffect(()=>{!re.current&&p==="Completed"&&N&&(re.current=!0,function(a=qs,R=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Js[m];M!=null?M().then(()=>X(()=>d(s+1))).catch(()=>X(()=>d(s+1))):d(s+1)};X(()=>d(0))},R)}())},[p,N]);const C=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Se}=L(k.isReferralFeatureEnabled),Ne=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Me=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),oe=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,le=Pe&&!C,Ze=xs(A?.loggedInUserRoleMap),we=r.externalConnections?.accounting[0]?.isValid,ce=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,me=de&&hs(A?.loggedInUserRoleMap),ue=be&&!C,Ge=r.company!=null&&js(r.company),$e=Ce&&Ge===!0&&!C,ze=oe&&Us(A?.loggedInUserRoleMap),Ye=le&&Rs(A?.loggedInUserRoleMap),Je=ue&&Hs(A?.loggedInUserRoleMap),qe=Ds(A?.loggedInUserRoleMap),We=fs(A?.loggedInUserRoleMap),E=ys(A?.loggedInUserRoleMap),g=bs(A?.loggedInUserRoleMap),I=Cs(A?.loggedInUserRoleMap),T=vs(A?.loggedInUserRoleMap),x=Os(A?.loggedInUserRoleMap),_e=oe&&T,Ae=de&&x,Ke=ue&&E,Qe=$e&&g,Xe=le&&I,es=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||ke===!0||Ze===!0||qe===!0||We===!0;return H.isSignedIn()?f==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||j==="Completed"?(ce===!0||ee&&!ie)&&we===!1&&u===!1&&z===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||ce!==!1||ie||ee?N&&r?.userRole&&u!=null&&z!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Ss,{children:e.jsxs(t,{element:e.jsx(zs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(gn,{isDashboardAccess:P,isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:z})}),e.jsx(t,{path:"dashboard/*",element:P?e.jsx(an,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:P?e.jsx(Ws,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:es||P?e.jsx(Qs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:P?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(en,{})}),e.jsx(t,{path:"transaction/*",element:P&&C===!1||Ne||Me?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:P&&C===!1?e.jsx(ln,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:P&&C===!1?e.jsx(Re,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:P&&C===!1?e.jsx(Re,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(En,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(An,{})}),e.jsx(t,{path:"address/*",element:ze||me||Je||Ye?e.jsx(Ks,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:Ke?e.jsx(rn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:Qe?e.jsx(on,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:se===!0?e.jsx(mn,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:se===!0&&C===!1?e.jsx(un,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(dn,{})}),e.jsx(t,{path:"vendors/*",element:Be?e.jsx(sn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:_e?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:_e?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:Ae?e.jsx(De,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:Ae?e.jsx(De,{}):e.jsx(D,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Fe?e.jsx(tn,{hasAdminLevelAccess:me}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:Xe?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Se?e.jsx(_n,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:W?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:W?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:W?e.jsx(pn,{isFileUploadEnabled:Le}):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:{...$.state,message:"...",origin:$.pathname}}))}const gn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:b,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"}):b?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:b,tenantEmailDomain:O})=>b===!0||i?e.jsx(hn,{tenantEmailDomain:O}):S?e.jsx(xn,{tenantEmailDomain:O}):U?e.jsx(jn,{tenantEmailDomain:O}):V?e.jsx(Tn,{tenantEmailDomain:O}):o?e.jsx(In,{tenantEmailDomain:O}):e.jsx(y,{}),In=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),Tn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),xn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),fe=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,Nn as default};
|