@zeniai/web-app-ui 5.3.30-qa → 5.3.31-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-63FlaGuq.js → AccountMappingScreen-UdzIeE_v.js} +2 -2
- package/dist/assets/AddressRoutes-CaXv_Hc-.js +1 -0
- package/dist/assets/AddressScreen-Dmypz8Cm.js +9 -0
- package/dist/assets/AiCfoScreen-DNghBGiO.js +22 -0
- package/dist/assets/AppDrawer-kOTtyyGv.js +10 -0
- package/dist/assets/{BillPayApprovalRoutes-BNU4FGHS.js → BillPayApprovalRoutes--ALQ35-1.js} +1 -1
- package/dist/assets/{BillPayRoutes-D9I2VGzJ.js → BillPayRoutes-BcTRlRv8.js} +9 -9
- package/dist/assets/{BusinessVerificationPageScreen-afqV4Atk.js → BusinessVerificationPageScreen-DzWgqXwG.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-C-AqWGUl.js → CardsAiCfoScreen-C_lk15md.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-B5cZ1kQb.js → ChargeCardRoutes-BjIdSbvb.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-BAW40Qn8.js → CompanyPassportScreen-BKrZbZ6U.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CUZc6Ync.js → ConnectionAuthScreen-Dzixugfp.js} +2 -2
- package/dist/assets/CustomerOnboardingAuthScreen-D31TaCjo.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-3cZyVkRN.js +30 -0
- package/dist/assets/{DashboardRoutes-Booe42V4.js → DashboardRoutes-BruAIMYU.js} +4 -4
- package/dist/assets/{DefaultTenantHome-C5VDGeyO.js → DefaultTenantHome-BtIFl_77.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-DhMVIfNi.js +18 -0
- package/dist/assets/DrawerScreen-CbY0_Vl5.js +1 -0
- package/dist/assets/EntityDetailRoutes-DpM6LjT5.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-Dll0r-g6.js +25 -0
- package/dist/assets/FeaturePreviewScreen-DRMNz052.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-CaSUfoGO.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-BIRPulc1.js → InboxNotificationsProvider-55rQDTXA.js} +1 -1
- package/dist/assets/InvoicingRoutes-B8ytNofm.js +2 -0
- package/dist/assets/{MagicLinkRoutes-ghi5jd2V.js → MagicLinkRoutes-DbYU9yxF.js} +19 -19
- package/dist/assets/MagicLinkSignInScreen-DSGkqzLp.js +12 -0
- package/dist/assets/{MobileAppDrawer-BJV6BsMX.js → MobileAppDrawer-BAV0ejOs.js} +1 -1
- package/dist/assets/NotFoundScreen-ButYFiTG.js +1 -0
- package/dist/assets/NotificationRoutes-jy7KSYzl.js +1 -0
- package/dist/assets/OAuthConsentScreen-4W57tKq2.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-Diz_Rn8O.js +1 -0
- package/dist/assets/PaymentLinkScreen-BcSDg2Q0.js +21 -0
- package/dist/assets/PeopleRoutes-BsxSMUvq.js +22 -0
- package/dist/assets/PerformanceRoutes-DFKVpzlk.js +1 -0
- package/dist/assets/{Preview-ByUhhrY0.js → Preview-DNAybQkC.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BVlzA_ks.js → QBOConnectionScreen-BmXy-56M.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-DW0hPEhv.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CGLqqLOn.js → ReimbursementApprovalRuleDetailScreen-lyJcYNIg.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DyJDzvC0.js → ReimbursementRoutes-BQ18gzav.js} +9 -9
- package/dist/assets/ReportsRoutes-iapNY-Ca.js +1 -0
- package/dist/assets/RewardsRoutes-CO35jNo-.js +1 -0
- package/dist/assets/ScreenRoutes-B2fNAm1R.js +2 -0
- package/dist/assets/{SettingsRoutes-DxnIfIbH.js → SettingsRoutes-DU6XdEOY.js} +6 -6
- package/dist/assets/{SetupPagesScreen-C1Oev9K8.js → SetupPagesScreen-CPUD_j1y.js} +5 -5
- package/dist/assets/SignInScreen-DL2bXt_7.js +1 -0
- package/dist/assets/SignOutScreen-DSAHdKNP.js +9 -0
- package/dist/assets/{TaskListScreen-BFlHqYcu.js → TaskListScreen-BH2rdLa7.js} +2 -2
- package/dist/assets/{TaskRoutes-BmnOylhk.js → TaskRoutes-C-JJtR4s.js} +2 -2
- package/dist/assets/TransactionDetailRoutes-CaIXvpDL.js +1 -0
- package/dist/assets/TransactionDetailScreen-srWo_3sK.js +5 -0
- package/dist/assets/TransactionListRoutes-CpBDr1qT.js +1 -0
- package/dist/assets/TreasuryRoutes-Ja8FQwZH.js +37 -0
- package/dist/assets/VendorsRoutes-CoiOEvIl.js +112 -0
- package/dist/assets/WiseConfirmationScreen-Dj7QUTt6.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CRSCFOIu.js → ZeniAccountRoutes-BjLND6jg.js} +8 -8
- package/dist/assets/ZeniAccountStatementScreen-BgOPM6A3.js +9 -0
- package/dist/assets/{accountMappingHelper-CU6wucuM.js → accountMappingHelper-CAg2qsF3.js} +1 -1
- package/dist/assets/{analytics-BgUj-hR5.js → analytics-CqoRAkB1.js} +1 -1
- package/dist/assets/{analyticsHelper-CqV558Dq.js → analyticsHelper-Cjtujqyf.js} +1 -1
- package/dist/assets/{core-CMivCywN.js → core-CiFsHd3i.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DRefzrWS.js → decodeURIComponentSafe-FYjI-TwW.js} +1 -1
- package/dist/assets/{dnd-B8NpvFCU.js → dnd-jcX4BW0a.js} +1 -1
- package/dist/assets/{empty-CllNfDt1.js → empty-4iGv0vIv.js} +1 -1
- package/dist/assets/{empty-CawgNJEF.js → empty-DSab5moc.js} +1 -1
- package/dist/assets/{emptyVideoElement-DBVZ22o5.js → emptyVideoElement-BSwv6rHf.js} +1 -1
- package/dist/assets/{epic-Cw47VvOB.js → epic-CjiXGW6W.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-BuTA7ucx.js → expenseAutomationHelper-R2jHKv-Z.js} +1 -1
- package/dist/assets/getLocaleForTenant-CRduVQsY.js +1 -0
- package/dist/assets/{index-DCnLtCHg.js → index-0sENwUb_.js} +1 -1
- package/dist/assets/{index-BnHTUbKj.js → index-2FqIUc6q.js} +1 -1
- package/dist/assets/{index-CD-EymjZ.js → index-BJOxGHxN.js} +2 -2
- package/dist/assets/{index-baDCTZK3.js → index-CVbu1_bp.js} +1 -1
- package/dist/assets/{index-Cx55eHdr.js → index-Cz99TrBA.js} +1 -1
- package/dist/assets/{index-XoGDegrx.js → index-D6dzsKZ7.js} +1 -1
- package/dist/assets/{index-Djuwyi3d.js → index-DGRhh-da.js} +1 -1
- package/dist/assets/{index-D90YkzK-.js → index-juRht-9c.js} +11171 -11173
- package/dist/assets/{lexical-Di6ZXkXF.js → lexical-DBiumTDC.js} +1 -1
- package/dist/assets/{liveblocks-mJJR3MsR.js → liveblocks-CkQ2CY6T.js} +1 -1
- package/dist/assets/{lottie-BTBtSLCO.js → lottie-cUBeCDOE.js} +1 -1
- package/dist/assets/{mui-C6XtNCo7.js → mui-FQy08n5j.js} +1 -1
- package/dist/assets/{pathToGoBack-DkQc48Fj.js → pathToGoBack-DWIhT07R.js} +1 -1
- package/dist/assets/{pdf-DSDpdkmb.js → pdf-C6cPvWx8.js} +3 -3
- package/dist/assets/{pdf-lib-BbzL8H1t.js → pdf-lib-C9DR7g8H.js} +1 -1
- package/dist/assets/{plaid-l8YRzpBD.js → plaid-Dw5LGskq.js} +1 -1
- package/dist/assets/{pusher-B8Hm6DMT.js → pusher-Bs1ItrSl.js} +1 -1
- package/dist/assets/{react-BeA4fGXX.js → react-B-yGKA4G.js} +1 -1
- package/dist/assets/{react-TfJbQpIh.js → react-BD9-MMqW.js} +1 -1
- package/dist/assets/{react-FrhNEOT3.js → react-BK8OyR5e.js} +1 -1
- package/dist/assets/{react-CFob_XAv.js → react-BzoedhUW.js} +1 -1
- package/dist/assets/{react-hzw_vRmY.js → react-N2ByZQ0u.js} +1 -1
- package/dist/assets/{react-CexHjl19.js → react-Rj21KKGh.js} +1 -1
- package/dist/assets/{recharts-Co0_Dmc-.js → recharts-CYbL6OhC.js} +1 -1
- package/dist/assets/routePaths-DqksJ4i_.js +1 -0
- package/dist/assets/{sentry-CItQHKpv.js → sentry-Lj2WEO6K.js} +1 -1
- package/dist/assets/{url-MmuF1WQx.js → url-Bk85P8pL.js} +1 -1
- package/dist/assets/{url-xQ9KNY2e.js → url-DhKb0GNI.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-B3XyU0Fo.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-Dhoa0fnv.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-YQlWLN09.js +1 -0
- package/dist/assets/{useDeviceId-DJLfe-br.js → useDeviceId-CWOFj37E.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-DpIv7GW3.js +1 -0
- package/dist/assets/useInitialThreadRequest-D-SxLs4P.js +1 -0
- package/dist/assets/{useTaskManagerAccess-B60T1gBh.js → useTaskManagerAccess-BrCmQLIc.js} +1 -1
- package/dist/assets/{utils-macSqF2O.js → utils-DsJsAXTJ.js} +1 -1
- package/dist/assets/withTransactionSidePanel-BjLmCRfl.js +25 -0
- package/dist/assets/{zeni-epic-state-CqKBThJ0.js → zeni-epic-state-BdFiPfcm.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-BQZRAaHK.js +0 -1
- package/dist/assets/AddressScreen-_R6CTIVH.js +0 -9
- package/dist/assets/AiCfoScreen-C8gj-uzF.js +0 -22
- package/dist/assets/AppDrawer-BZUmu70o.js +0 -10
- package/dist/assets/CustomerOnboardingAuthScreen-9A7QgVmp.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-DXes1Er6.js +0 -30
- package/dist/assets/DomesticWireDetailScreen-7j7SGnOg.js +0 -18
- package/dist/assets/DrawerScreen-Csh3eD6J.js +0 -1
- package/dist/assets/EntityDetailRoutes-CCnyW919.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-DJxsaOLE.js +0 -38
- package/dist/assets/FeaturePreviewScreen-B6gcAXFm.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-CXXQU19P.js +0 -1
- package/dist/assets/InvoicingRoutes-CBapzsSL.js +0 -2
- package/dist/assets/MagicLinkSignInScreen-BqpLWUSF.js +0 -12
- package/dist/assets/NotFoundScreen-BnVyPaPi.js +0 -1
- package/dist/assets/NotificationRoutes-DyI8Xbpv.js +0 -1
- package/dist/assets/OAuthConsentScreen-DBMBI1eP.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-B5U8wcwH.js +0 -1
- package/dist/assets/PaymentLinkScreen-B8Npl8-P.js +0 -21
- package/dist/assets/PeopleRoutes-DtBr-ZhM.js +0 -22
- package/dist/assets/PerformanceRoutes-B2EvteS4.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-6KXXnCKA.js +0 -1
- package/dist/assets/ReportsRoutes-Dgbt88Ii.js +0 -1
- package/dist/assets/RewardsRoutes-DXDaRicq.js +0 -1
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-BmkDgkpw.js +0 -25
- package/dist/assets/ScreenRoutes-y2py2Sx-.js +0 -2
- package/dist/assets/SignInScreen-ClZvL2fM.js +0 -1
- package/dist/assets/SignOutScreen-CZbE2s88.js +0 -9
- package/dist/assets/TransactionDetailRoutes-rQlONmP8.js +0 -1
- package/dist/assets/TransactionDetailScreen-DnBKsQvp.js +0 -5
- package/dist/assets/TransactionListRoutes-Sw1sTXcA.js +0 -1
- package/dist/assets/TreasuryRoutes-MfsBOpsN.js +0 -37
- package/dist/assets/VendorsRoutes-_P343ySG.js +0 -88
- package/dist/assets/WiseConfirmationScreen-DKZOBDOL.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-svNdptRn.js +0 -9
- package/dist/assets/getLocaleForTenant-eit0V2sf.js +0 -1
- package/dist/assets/routePaths-BRn4bxlT.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BKbzFDsb.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CywXA9k2.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-93KEXKtp.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-BmofwXI5.js +0 -1
- package/dist/assets/useInitialThreadRequest-ChCTxMqY.js +0 -1
- package/dist/assets/withTransactionSidePanel-CNiAqI18.js +0 -25
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-CkQ2CY6T.js";import{p as Q,d as kc,c as an,g as jl,a as xl}from"./sentry-Lj2WEO6K.js";import{L as dt,b_ as Tc,fB as Ac,Tb as Rc,TY as kl,c7 as Tl}from"./zeni-epic-state-BdFiPfcm.js";import{a as lt,b as Al,c as Rl,d as Il,e as un,f as Pl,g as Nl,h as Ll,i as Vt,j as Ic,k as oe,l as je,m as $l,o as Yt,p as ue,q as Ml}from"./utils-DsJsAXTJ.js";import{r as cn}from"./empty-4iGv0vIv.js";import{r as Cl,a as Dl,b as Fl,c as Bl}from"./pdf-lib-C9DR7g8H.js";import{r as Ul}from"./index-CVbu1_bp.js";import{r as ql}from"./index-Cz99TrBA.js";import{h as Gl,g as zl,u as Zl,j as _n,l as Hl}from"./core-CiFsHd3i.js";import{u as Vl,z as Pc,L as Yl,ai as Kl,aj as Wl,T as Jl,B as Xl}from"./index-juRht-9c.js";import"./mui-FQy08n5j.js";import{d as Pe}from"./decodeURIComponentSafe-FYjI-TwW.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="150b7c8f-2c23-43e7-a18c-a5cc01642d1d",t._sentryDebugIdIdentifier="sentry-dbid-150b7c8f-2c23-43e7-a18c-a5cc01642d1d")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,In,Pn,Nn,Ne,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,zn,Le,Zn,Hn,Vn,Yn,Kn,Wn,Jn,$e,Xn,Qn,to,eo,ro,no,oo,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(jn)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 u(r,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},u(r,e)}function d(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=o(r);if(e){var h=o(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(m,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})(m)})(this,a)}}function o(r){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(r)}jn=1;var c,i,n={};function s(r,e,a){a||(a=Error);var p=(function(h){(function(l,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(y&&y.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),y&&u(l,y)})(g,h);var m,b=d(g);function g(l,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)})(l,y,v)),S.code=r,S}return m=g,Object.defineProperty(m,"prototype",{writable:!1}),m})(a);n[r]=p}function f(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 s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,m;if(c===void 0&&(c=ie()),c(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,l,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-l.length,y)===l})(r," argument"))m="The ".concat(r," ").concat(p," ").concat(f(e,"type"));else{var b=(function(g,l,y){return typeof y!="number"&&(y=0),!(y+l.length>g.length)&&g.indexOf(l,y)!==-1})(r,".")?"property":"argument";m='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(f(e,"type"))}return m+=". Received type ".concat(t(a))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";i===void 0&&(i=lt());var p=i.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),s("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),s("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];c===void 0&&(c=ie()),c(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(m){return'"'.concat(m,'"')})),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 Ql(){if(kn)return xn;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 u(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){d(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 d(k,E,j){return(E=c(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function o(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,c(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function c(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 i(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 s(k){var E=typeof Map=="function"?new Map:void 0;return s=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 f(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},s(k)}function f(k,E,j){return f=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},f.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)}kn=1;var h=lt().inspect,m=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="",l="",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 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-CkQ2CY6T.js";import W from"./NotFoundScreen-ButYFiTG.js";import{a as p}from"./sentry-Lj2WEO6K.js";import{h as C,g as D,u as V,j as u,N as k,l as U,n as Y,o as g}from"./core-CiFsHd3i.js";import{fB as E,Yh as h,Yy as R,MY as N,MU as B,MX as f,MN as L,YX as M,MR as X,M_ as z}from"./zeni-epic-state-BdFiPfcm.js";import{z as T,w as $,c7 as K,l as _,bQ as Q,c8 as q}from"./index-juRht-9c.js";import"./mui-FQy08n5j.js";import{u as F,R as x}from"./ReimbursementApprovalRuleDetailScreen-lyJcYNIg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="b9167535-79e7-453b-8234-6e937df608da",e._sentryDebugIdIdentifier="sentry-dbid-b9167535-79e7-453b-8234-6e937df608da")}catch{}})();const A="reimbursement-approval-rule-update",G=U((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:R(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(M(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))($(K)),H=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>R(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(N())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(w(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${A}`]:[],eventCallback:(o,y,j)=>{o.endsWith(A)&&j.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(G,{currentTenant:c,location:n,navigate:s,...m})},I="reimbursement-approval-rule-update",J=U((function(e){const s=h(e),n=R(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(M(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(z(t,!0))}}}))($(q)),P=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=Q(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(H,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));F();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(N())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(X(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${I}`]:[],eventCallback:(i,ee,O)=>{i.endsWith(I)&&O.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(J,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function le(){return r.jsxs(Y,{children:[r.jsx(g,{path:"/",element:r.jsx(P,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(W,{})})]})}export{le as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-CkQ2CY6T.js";import{a as f}from"./sentry-Lj2WEO6K.js";import{u as U,j as g,h as C,g as O,i as V,l as k}from"./core-CiFsHd3i.js";import{mn as q,Yy as w,Yh as _,MQ as B,N1 as j,MY as A,MZ as E,Yz as N,fB as L,MX as z}from"./zeni-epic-state-BdFiPfcm.js";import{z as F,E as P,a5 as $,b_ as Q,l as M,bQ as K,b$ as W}from"./index-juRht-9c.js";import"./mui-FQy08n5j.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="373a50a5-e6e5-4ffc-9822-8d59ed0cbe98",e._sentryDebugIdIdentifier="sentry-dbid-373a50a5-e6e5-4ffc-9822-8d59ed0cbe98")}catch{}})();function X(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(q({})))}),[p,t,e])}const Z=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=M(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),R=u.actors.selectedNonUsers.map((m=>{const y=(b=m.value,N(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(R);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(Q);function G(){const e=C(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>_(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(B(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(Z,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return N(e)==null}const H=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:_(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=M(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((y=>{const b=y.actorKind?.selectedOption,Y=y.selectedRole?.selectedNonUsers??[];let D=[];b==="role"?D=Y.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=S?.selection.selectedOptions??[];if(R.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=g((t=>L(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?h.jsx(J,{}):h.jsx(G,{})}function J(){const e=C(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>_(n))),[a,d]=f.useState(!1);if(X(),f.useEffect((()=>{a||(d(!0),s(B(!1)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(H,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,X as u};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-mJJR3MsR.js";import{u as ae,j as v,h as K,g as J,i as ie,N as $,l as ee,q as ct,n as dt,o as w}from"./core-CMivCywN.js";import{fB as Z,MU as ut,_6 as ge,c7 as he,L_ as Le,m6 as pt,Md as ce,Mc as de,_7 as bt,bn as fe,gS as _e,_8 as gt,W4 as ht,lX as Me,W5 as Ce,W6 as ft,kJ as St,Y7 as It,kY as yt,LO as Rt,Bv as vt,kQ as At,Mz as $e,_9 as Pe,_a as Ee,_b as kt,_c as Ct,_d as Et,Mj as we,l2 as wt,Yg as xt,Mb as Bt,LY as Tt,_e as Dt,LX as jt,_f as Ft,M3 as xe,Mn as Ut,Mm as Lt,Mi as _t,_g as Ne,Rx as Mt,bo as $t,M6 as Pt,MR as Nt,_h as Ot,_i as zt,Mv as Gt,Ms as Be,XD as Vt,LV as Zt,_j as Oe,Ni as Te,Nq as Ht,_k as Wt,_l as Y,_m as qt,_n as ze,_o as Yt,_p as Ge,_q as Ve,MH as ue,bu as Xt,bK as Se,cL as Ie,dV as Ze,dU as He,_r as Jt,gd as Qt,XQ as Kt,_s as en,_t as We,XU as tn,YC as nn,_u as an,Y$ as sn,Nn as De,Nm as on,_v as rn,_w as ln,_x as mn,_y as cn,_z as dn,Ym as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cF as fn,ct as Sn,bt as In,Tw as yn,d6 as Rn,d9 as vn,d8 as An,cE as kn}from"./zeni-epic-state-CqKBThJ0.js";import{bS as Cn,U as qe,a1 as Ye,O as oe,y as x,z as _,cR as Xe,a8 as re,h as C,aS as je,F,ae as se,af as En,G as Je,cS as wn,p as X,as as Qe,cT as xn,J as le,cU as Bn,aq as Tn,ab as Dn,a7 as ye,Q as Ke,w as jn,bA as Fn,av as Un,ai as Ln,E as et,cV as _n,f as Mn}from"./index-D90YkzK-.js";import{n as P,S as $n}from"./mui-C6XtNCo7.js";import pe from"./NotFoundScreen-BnVyPaPi.js";import{S as Fe}from"./SetupPagesScreen-C1Oev9K8.js";import{F as tt}from"./FeaturePreviewScreen-B6gcAXFm.js";import{a as h}from"./sentry-CItQHKpv.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-CywXA9k2.js";import{u as nt}from"./useInitialThreadRequest-ChCTxMqY.js";import{D as Pn}from"./DrawerScreen-Csh3eD6J.js";import{M as at}from"./MobileAppDrawer-BJV6BsMX.js";import{F as Nn}from"./ScreenRoutes-y2py2Sx-.js";import{R as On}from"./ReimbursementApprovalRoutes-6KXXnCKA.js";import"./recharts-Co0_Dmc-.js";import"./analytics-BgUj-hR5.js";import"./plaid-l8YRzpBD.js";import"./dnd-B8NpvFCU.js";import"./stripe-cKAAJElX.js";import"./lottie-BTBtSLCO.js";import"./lexical-Di6ZXkXF.js";import"./pdf-DSDpdkmb.js";import"./utils-macSqF2O.js";import"./BusinessVerificationPageScreen-afqV4Atk.js";import"./routePaths-BRn4bxlT.js";import"./analyticsHelper-CqV558Dq.js";import"./InboxNotificationsProvider-BIRPulc1.js";import"./useTaskManagerAccess-B60T1gBh.js";import"./getLocaleForTenant-eit0V2sf.js";import"./ReimbursementApprovalRuleDetailScreen-CGLqqLOn.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]="63abf38b-0576-4fb8-8ab2-a88430bf91be",e._sentryDebugIdIdentifier="sentry-dbid-63abf38b-0576-4fb8-8ab2-a88430bf91be")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Je.getLocalizedStrings(),Gn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(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(xe(!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(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ee({}));const i=st(o),l=X(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Ue(){const e=K(),t=ae(),n=J(),{reimbursementId:r}=ie(),c=qe(),d=Ye(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=J().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>Z(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((Q=>Z(Q))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:H}=Cn(O),W=v((Q=>Q.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||H||W==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,H,z,W,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const M=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx($,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Xe,{isNewReimbursement:r==null}):s.jsxs(Vn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Zn,{}):null,m&&d!=="small"?s.jsx(Hn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Wn,{children:[s.jsx(qn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Yn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Vn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-CkQ2CY6T.js";import{u as ae,j as v,h as K,g as Q,i as ie,N as P,l as ee,q as ct,n as dt,o as w}from"./core-CiFsHd3i.js";import{fB as Z,MU as ut,_2 as ge,c7 as he,L_ as Le,m6 as pt,Md as ce,Mc as de,_3 as bt,bn as fe,gS as _e,_4 as gt,V0 as ht,lX as Me,V1 as Ce,V2 as ft,kJ as St,Y3 as It,kY as yt,LO as Rt,Bv as vt,kQ as At,Mz as Pe,_5 as $e,_6 as Ee,_7 as kt,_8 as Ct,_9 as Et,Mj as we,l2 as wt,Yc as xt,Mb as Bt,LY as Tt,_a as Dt,LX as jt,_b as Ft,M3 as xe,Mn as Ut,Mm as Lt,Mi as _t,_c as Ne,Rx as Mt,bo as Pt,M6 as $t,MR as Nt,_d as Ot,_e as zt,Mv as Gt,Ms as Be,Xz as Vt,LV as Zt,_f as Oe,Ni as Te,Nq as Ht,_g as Wt,_h as Y,_i as qt,_j as ze,_k as Yt,_l as Ge,_m as Ve,MH as ue,bu as Xt,bK as Se,cL as Ie,dV as Ze,dU as He,_n as Qt,gd as Jt,XM as Kt,_o as en,_p as We,XQ as tn,Yy as nn,_q as an,YX as sn,Nn as De,Nm as on,_r as rn,_s as ln,_t as mn,_u as cn,_v as dn,Yi as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cF as fn,ct as Sn,bt as In,Ts as yn,d6 as Rn,d9 as vn,d8 as An,cE as kn}from"./zeni-epic-state-BdFiPfcm.js";import{bQ as Cn,U as qe,$ as Ye,O as oe,y as x,z as _,cP as Xe,a6 as re,h as C,aW as je,F,ac as se,ad as En,G as Qe,cQ as wn,p as X,aq as Je,cR as xn,V as le,cS as Bn,ao as Tn,a9 as Dn,a5 as ye,N as Ke,w as jn,by as Fn,at as Un,ag as Ln,E as et,cT as _n,f as Mn}from"./index-juRht-9c.js";import{n as $,S as Pn}from"./mui-FQy08n5j.js";import pe from"./NotFoundScreen-ButYFiTG.js";import{S as Fe}from"./SetupPagesScreen-CPUD_j1y.js";import{F as tt}from"./FeaturePreviewScreen-DRMNz052.js";import{a as h}from"./sentry-Lj2WEO6K.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-Dhoa0fnv.js";import{u as nt}from"./useInitialThreadRequest-D-SxLs4P.js";import{D as $n}from"./DrawerScreen-CbY0_Vl5.js";import{M as at}from"./MobileAppDrawer-BAV0ejOs.js";import{F as Nn}from"./ScreenRoutes-B2fNAm1R.js";import{R as On}from"./ReimbursementApprovalRoutes-DW0hPEhv.js";import"./recharts-CYbL6OhC.js";import"./analytics-CqoRAkB1.js";import"./plaid-Dw5LGskq.js";import"./dnd-jcX4BW0a.js";import"./stripe-cKAAJElX.js";import"./lottie-cUBeCDOE.js";import"./lexical-DBiumTDC.js";import"./pdf-C6cPvWx8.js";import"./utils-DsJsAXTJ.js";import"./BusinessVerificationPageScreen-DzWgqXwG.js";import"./routePaths-DqksJ4i_.js";import"./analyticsHelper-Cjtujqyf.js";import"./InboxNotificationsProvider-55rQDTXA.js";import"./useTaskManagerAccess-BrCmQLIc.js";import"./getLocaleForTenant-CRduVQsY.js";import"./ReimbursementApprovalRuleDetailScreen-lyJcYNIg.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]="c5c8caca-6474-4c40-a38e-2631f112e9df",e._sentryDebugIdIdentifier="sentry-dbid-c5c8caca-6474-4c40-a38e-2631f112e9df")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Qe.getLocalizedStrings(),Gn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(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(xe(!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(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e($e()),e(Ee({}));const i=st(o),l=X(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Pe(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Ue(){const e=K(),t=ae(),n=Q(),{reimbursementId:r}=ie(),c=qe(),d=Ye(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=Q().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>Z(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((J=>Z(J))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:H}=Cn(O),W=v((J=>J.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||H||W==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,H,z,W,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const M=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(P,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Xe,{isNewReimbursement:r==null}):s.jsxs(Vn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Zn,{}):null,m&&d!=="small"?s.jsx(Hn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Wn,{children:[s.jsx(qn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Yn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Vn=$.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
5
5
|
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
6
|
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,Zn
|
|
7
|
+
`,Zn=$.div`
|
|
8
8
|
position: fixed;
|
|
9
9
|
top: 0;
|
|
10
10
|
left: 0;
|
|
@@ -12,7 +12,7 @@ import{j as s}from"./liveblocks-mJJR3MsR.js";import{u as ae,j as v,h as K,g as J
|
|
|
12
12
|
bottom: 0;
|
|
13
13
|
background-color: ${En.overlayBackgroundBlack};
|
|
14
14
|
z-index: 5;
|
|
15
|
-
`,Hn
|
|
15
|
+
`,Hn=$.div`
|
|
16
16
|
position: absolute;
|
|
17
17
|
top: 0;
|
|
18
18
|
left: 0;
|
|
@@ -22,7 +22,7 @@ import{j as s}from"./liveblocks-mJJR3MsR.js";import{u as ae,j as v,h as K,g as J
|
|
|
22
22
|
display: flex;
|
|
23
23
|
background-color: transparent;
|
|
24
24
|
overflow: hidden;
|
|
25
|
-
`,Wn
|
|
25
|
+
`,Wn=$.div`
|
|
26
26
|
position: fixed;
|
|
27
27
|
top: 0;
|
|
28
28
|
left: 0;
|
|
@@ -33,7 +33,7 @@ import{j as s}from"./liveblocks-mJJR3MsR.js";import{u as ae,j as v,h as K,g as J
|
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
overflow-y: auto;
|
|
35
35
|
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,qn
|
|
36
|
+
`,qn=$.button`
|
|
37
37
|
align-self: flex-end;
|
|
38
38
|
background: none;
|
|
39
39
|
border: none;
|
|
@@ -48,12 +48,12 @@ import{j as s}from"./liveblocks-mJJR3MsR.js";import{u as ae,j as v,h as K,g as J
|
|
|
48
48
|
width: ${F.sp4};
|
|
49
49
|
height: ${F.sp4};
|
|
50
50
|
}
|
|
51
|
-
`,Yn
|
|
51
|
+
`,Yn=$.div`
|
|
52
52
|
display: flex;
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Xn=ee((function(e,t){const n=Ne(e,t.reimbursementId),r=_.getSignedInUser(),c=fe(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ot(n.remiActivities,zt(t.currentTenant),r));const i=he(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(
|
|
56
|
+
`,Xn=ee((function(e,t){const n=Ne(e,t.reimbursementId),r=_.getSignedInUser(),c=fe(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ot(n.remiActivities,zt(t.currentTenant),r));const i=he(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e($e());const a=st(o),i=X(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Vt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Be(n,a.type,"")):e(Be(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=X(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{C.trackReimbursementDeleteReimbursement(n),e(Pe(n))},cancelAndDeleteReport:a=>{a===!0?C.trackReimbursementCancelAndDeleteReimbursement(n):C.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}}))(xn);function Qn(){const e=K(),t=ae(),n=Q(),r=n.hash.substring(1),c=qe(),{reimbursementId:d}=ie(),m=_.getSignedInUser(),o=v((R=>Z(R))),a=v((R=>Ne(R,d??""))),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=nt(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"});Je({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:f}=oe(),{isFeatureEnabled:B}=f(x.isLimitedCategoryForReimbursement),[u,T]=h.useState(!1),[D,j]=h.useState(!1),[A,k]=h.useState(!1),{isFeatureEnabled:E}=f(x.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=f(x.isShowDeletedReimbursementsFeatureEnabled),g=v((R=>ge(R,d??""))),U=Mt(o),L=Pt(o.userRole),M=a.fetchState;if(h.useEffect((()=>{u||d==null?u==1&&M==="Error"&&e("page-not-found",{replace:!0}):(T(!0),t($t(d,!1,I)))}),[u,d,t,M]),h.useEffect((()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&U===!1?k(!1):k(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(L||a.allApprovers.find((R=>R.user.userId===m?.userId))!=null||a.remiDetails?.lastUpdatedBy===m?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,L,o.isZeni,U,m]),h.useEffect((()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(j(!0),t(Le(!1,B,I,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Nt(!1,!0,!0,a.lastUpdatedByUserId)))}),[D,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(P,{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(Xe,{}):s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:C,onLoad:R=>(p=>{d!=null&&p.trackReimbursementReimbursementDetails(d)})(R)}),s.jsx(Xn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:E,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:A,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:b,onAskAiCfoClick:y})]})}const Jn=ee((function(e,t){return{remisReviewView:Oe(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/reimbursements`),e(Y())},onCloseReviewItem:n=>{e(Wt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Ht());break;case"approve":e(Te("approved",r??""));break;case"reject":e(Te("rejected",r??""))}}}}))(Bn);function Kn({tenantEmailDomain:e}){const t=K(),n=v((m=>m.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:r}=v((m=>Oe(m))),c=le(),d=c?.loggedInUserRole?.includes("admin")===!0;return h.useEffect((()=>{n!=="Completed"&&r.length!==0||t(`/${e}/reimbursements`)}),[n,r.length,e]),s.jsx(Jn,{navigate:t,analytics:C,isAdmin:d,tenantEmailDomain:e})}const V=tn(),it="bulk-operation-update",be="reimbursement-approval-rule-update",{spendManagement:ea,common:me}=Qe.getLocalizedStrings(),ta=ea.reimbursement.bulkActions,na=$.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
min-height: 100%;
|
|
59
59
|
width: 100%;
|
|
@@ -61,8 +61,8 @@ import{j as s}from"./liveblocks-mJJR3MsR.js";import{u as ae,j as v,h as K,g as J
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,aa=ee((function(e,t){const n=Ve(e,V,t.isBulkActionEnabled);let r=n.allSubTabs;const c=_.getSignedInUser(),d=fe(c),m=e.tenantState.currentTenantId,o=Z(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((f=>f!=="deleted")));const b=n.fetchState,y=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((f=>f.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:C,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:V,spendManagementEndPoint:`${Un}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(Y()),e(ze(o))},onSubtabChange:o=>{e(Y()),e(Ge(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=X(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=X(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;C?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=X(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))&&C.trackSpendManagmentFilterChange("reimbursement",o.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&C.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(ue(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(Y())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(De("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(De("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(be)&&e(sn(!1))},onEventReceived:o=>{o===it&&e(an())}}}))(jn(Fn));function sa(){const e=K(),t=ae(),n=
|
|
64
|
+
`,aa=ee((function(e,t){const n=Ve(e,V,t.isBulkActionEnabled);let r=n.allSubTabs;const c=_.getSignedInUser(),d=fe(c),m=e.tenantState.currentTenantId,o=Z(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((f=>f!=="deleted")));const b=n.fetchState,y=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((f=>f.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:C,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:V,spendManagementEndPoint:`${Un}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(Y()),e(ze(o))},onSubtabChange:o=>{e(Y()),e(Ge(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=X(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=X(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;C?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=X(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))&&C.trackSpendManagmentFilterChange("reimbursement",o.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&C.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(ue(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(Y())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(De("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(De("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(be)&&e(sn(!1))},onEventReceived:o=>{o===it&&e(an())}}}))(jn(Fn));function sa(){const e=K(),t=ae(),n=Q(),r=n.state,c=Ye(),[d,m]=h.useState(null),o=ct("/:tenantEmailDomain/reimbursements/bulk-review")!=null;h.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const S=qt(r.tab.toString());S!=null?t(ze(S)):console.log("Warning:Not a valid remiListTab");const G=Yt(r.subTab.toString());G!=null?t(Ge(G)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(Y())}}),[]);const{useFeatureGate:a}=oe(),{isFeatureEnabled:i}=a(x.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(x.isBillPayCommentingEnabled),{isFeatureEnabled:y}=a(x.isReimbursementCommentingEnabled),{isFeatureEnabled:f}=a(x.isReimbursementBulkActionEnabled),B=_.getSignedInUser(),u=v((S=>Z(S))),[T,D]=h.useState(!1),[j,A]=h.useState(!1),k=le(),E=k?.loggedInUserRole?.includes("admin")===!0,I=v((S=>Ve(S,V,f))),{areTenantIdsInSync:g}=Tn(),U=I.fetchState,{isAiCfoAccessEnabled:L,onAskAiCfoClick:M}=Re({mobileExploreReferrer:"Reimbursement List"});if(Je({isDataReady:U==="Completed"}),h.useEffect((()=>{!j&&g&&(A(!0),t(ue(V,!0,l,!1,!0)))}),[j,V,t,g]),B==null)throw Error("Can't access address page without signing in...");const R=!!u?.userRole&&Xt(u),p=Se(k?.loggedInUserRoleMap),N=Ie(k?.loggedInUserRoleMap),O=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,z=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,H=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,W=v((S=>_e(S.companyState,u.companyId))),J=W?.company.featuresActivationInfo.connectedAccountProvider,ve=S=>{D(S)},{isFeatureEnabled:ot}=a(x.isDebitCardFeatureEnabled),rt=Ze(ot,u),lt=He(u),{remisProcessed:te,remisProcessing:Ae}=v((S=>Qt(S)));h.useEffect((()=>{te===Ae&&d!=null&&(t(Jt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:te>1?me.texts.reports2:ta.report},{variableName:"_has_",variableValue:te>1?me.texts.have:me.texts.has},{variableName:"_action_",variableValue:Kt(d)}]})),t(en()),setTimeout((()=>{t(ue(V,!0,l,!1,!0,!0))}),3e3),m(null))}),[te,Ae]);const mt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${it}`,`private-encrypted-${u.companyId}.${be}`]:[],eventCallback:(S,G,ke)=>{S.endsWith(be)?ke.onReimbursementApprovalRulesEventReceived?.(S):G.entity_type==="reimbursement"&&(m(G.operation_type),ke.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?rt===!0||lt===!0?s.jsx(tt,{}):z&&(!R||p)||N&&O?s.jsxs(s.Fragment,{children:[U==="Completed"?s.jsx(re,{analytics:C,onLoad:S=>(G=>G.trackPageLoaded(Ke.Event.reimbursementHome))(S)}):null,s.jsx(at,{isAppContentDrawerOpen:T,handleDrawerToggle:ve}),s.jsxs(na,{windowSize:c,children:[s.jsx($n,{isOpen:o,drawerLeftMargin:new Dn(0,0,300,600),onClose:()=>{e(`/${u.tenantEmailDomain}/reimbursements`),t(Y())},children:s.jsx(ra,{onClick:S=>S.stopPropagation(),children:s.jsx(Kn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(aa,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:y,location:n,navigate:e,currentTenant:u,period:V,isAdmin:E,isEmployee:R,entity:"reimbursement",onClickMenuIcon:()=>{ve(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:J,isBulkActionEnabled:f,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:L,onAskAiCfoClick:M,...mt})]})]}):H&&p?s.jsx(P,{to:"../setup"}):k!=null&&We(u,k.loggedInUserRoleMap)?s.jsx(P,{to:"../promo"}):s.jsx(ye,{fetchState:"In-Progress"}):s.jsx(pe,{})}const ia=e=>`/${e}/reimbursements/setup`,oa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ra=$(Pn)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
68
|
-
`,la=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:C,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"})}}}))(_n),ma=()=>{const e=Ln(),t=K(),n=
|
|
68
|
+
`,la=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:C,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"})}}}))(_n),ma=()=>{const e=Ln(),t=K(),n=Q(),{tenantEmailDomain:r}=ie(),c=et(),[d,m]=h.useState(!1),o=v((A=>Z(A))),a=_.getSignedInUserTenant(r)?.companyId??o.companyId,i=_.getSignedInUser(),l=o.userRoleId,b=!!o.userRole?.includes("reimbursements_user"),y=le(),f=Se(y?.loggedInUserRoleMap),B=Ie(y?.loggedInUserRoleMap),u=!!o.userReimbursementInfo?.isReimbursementTOSAccepted,T=!!o.companyReimbursementInfo?.info?.isReimbursementEnabled,D=!!o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,j=A=>{m(A)};if(i==null)throw Error("Can't access reimbursement promo page without signing in...");return T&&B&&u?s.jsx(P,{to:"../../../reimbursements"}):D&&f?s.jsx(P,{to:"../../reimbursements/setup"}):o.companyReimbursementInfo&&!D||o.userReimbursementInfo&&B&&u===!1?s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:C,onLoad:A=>(k=>k.trackPageLoaded(Ke.Event.reimbursementPromoPage))(A)}),s.jsx(at,{isAppContentDrawerOpen:d,handleDrawerToggle:j}),s.jsx(la,{companyId:a,navigate:t,meetingUrl:e("reimbursement_promo"),location:n,userReimbursementInfo:o.userReimbursementInfo,userRoleId:l,isEmployee:b,onClickMenuIcon:()=>{j(!0)}})]}):s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:c.colors.grey5}})};function Oa(){const e=v((W=>Z(W))),t=le(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=et(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=oe(),{isFeatureEnabled:o}=m(x.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(x.isDebitCardFeatureEnabled),i=Ze(a,e),l=He(e),b=e?.userRole!=null&&gn(e?.userRole),y=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),f=fn(t?.loggedInUserRoleMap),B=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=Se(t?.loggedInUserRoleMap),T=B&&u,D=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!b,j=D&&Sn(t?.loggedInUserRoleMap),A=Mn(e,o,a)&&!b,k=A&&In(t?.loggedInUserRoleMap),E=yn(t?.loggedInUserRoleMap),I=Rn(t?.loggedInUserRoleMap),g=vn(t?.loggedInUserRoleMap),U=D&&I,L=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!b&&g,M=An(t?.loggedInUserRoleMap),R=kn(t?.loggedInUserRoleMap),p=Ie(t?.loggedInUserRoleMap),N=A&&M,{tenantEmailDomain:O}=ie(),z=Q(),H=n===!0&&(u||p&&d);return s.jsxs(dt,{children:[z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(w,{path:"verification",element:s.jsx(Fe,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:k,isUserHasOnlyCardAccess:E,productType:"reimbursement",type:"verification"})}),s.jsx(w,{path:"setup",element:s.jsx(Fe,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:k,isUserHasOnlyCardAccess:E,productType:"reimbursement",type:"setup"})}),s.jsx(w,{path:"promo",element:s.jsx(ma,{})}),s.jsx(w,{path:"approval-rules/*",element:T?s.jsx(On,{}):s.jsx(Nn,{showZeniAccountRoute:U,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:p,showTreasuryRoute:L,isTenantBankingOnly:i,showChargeCardRoute:N,tenantEmailDomain:O??""})}),H&&s.jsx(w,{path:"*",element:s.jsx(sa,{})}),(i===!0||l===!0)&&s.jsx(w,{path:"/*",element:s.jsx(tt,{})}),t!=null&&We(e,t?.loggedInUserRoleMap)&&s.jsx(w,{path:"*",element:s.jsx(P,{to:"../promo"})}),c&&u&&s.jsx(w,{path:"*",element:s.jsx(P,{to:"../setup"})})]}):z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(w,{path:"new",element:s.jsx(Ue,{})}),s.jsx(w,{path:":reimbursementId",element:s.jsx(Qn,{})}),s.jsx(w,{path:":reimbursementId/edit",element:s.jsx(Ue,{})}),s.jsx(w,{path:"*",element:s.jsx(pe,{})})]}):s.jsx(w,{path:"*",element:s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${F.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(w,{path:"*",element:s.jsx(pe,{})})]})}export{Oa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as p}from"./liveblocks-CkQ2CY6T.js";import{g as W,h as De,u as Oe,i as Fe,j as d,l as Ae,n as Pe,o as ee}from"./core-CiFsHd3i.js";import{fB as $,Dr as R,TZ as Ee,lX as le,tx as ce,um as F,lC as Le,lL as A,lD as P,kG as E,kx as L,kw as Me,CB as ie,ur as Be,bq as ve,T_ as Ve,bn as xe,DO as ze,T$ as Ge,U0 as He,ch as S,Cu as Ye,U1 as ae,U2 as Ne,U3 as qe,U4 as $e,U5 as Ze,U6 as Qe,U7 as Xe,U8 as Je,U9 as Ke,Ua as We,Ub as ea,Uc as aa,Ud as sa,Ue as k,Uf as M,Ug as B,Uh as v,Ui as V,Uj as x,Uk as z,Ul as G,Um as H,Un as Y,e8 as ta,Ds as oa,Df as se,Dg as te,Dy as na,Dk as oe,DE as ra,Uo as la,Up as ca,Uq as ia,Ur as da,Us as pa,Ut as _a,Uu as fa,Uv as ma,Uw as ua,Ux as ba,dV as ha,dU as ya}from"./zeni-epic-state-BdFiPfcm.js";import{al as Ca,am as wa,an as ga,a as Sa,$ as Ia,O as de,y as N,z as pe,ao as Ra,V as Ta,d as ka,ap as ja,aq as Ua,a6 as Da,h as q,N as Oa,s as Fa,p as _e,ar as Aa,as as Pa,at as Ea}from"./index-juRht-9c.js";import"./mui-FQy08n5j.js";import La from"./NotFoundScreen-ButYFiTG.js";import{F as Ma}from"./FeaturePreviewScreen-DRMNz052.js";import{a as u}from"./sentry-Lj2WEO6K.js";import{u as Ba}from"./useInitialThreadRequest-D-SxLs4P.js";import{t as ne,a as re,b as va}from"./routePaths-DqksJ4i_.js";import{M as Va}from"./MobileAppDrawer-BAV0ejOs.js";import"./recharts-CYbL6OhC.js";import"./analytics-CqoRAkB1.js";import"./plaid-Dw5LGskq.js";import"./dnd-jcX4BW0a.js";import"./stripe-cKAAJElX.js";import"./lottie-cUBeCDOE.js";import"./lexical-DBiumTDC.js";import"./pdf-C6cPvWx8.js";import"./utils-DsJsAXTJ.js";import"./InboxNotificationsProvider-55rQDTXA.js";import"./useTaskManagerAccess-BrCmQLIc.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]="4b9f0dd5-2d90-47f8-a430-da6403553b3c",e._sentryDebugIdIdentifier="sentry-dbid-4b9f0dd5-2d90-47f8-a430-da6403553b3c")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(V({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(B({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua()),e(ba())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=$(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=Ve(m);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,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:q,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(k(a)),(I(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(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(oa({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=ta(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 f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?va(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(V({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(B({scrollPosition:s}));break;case"cash_flow":e(M({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(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(V({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=S(t);l?(e(Je({viewMode:a})),e(Ke({viewMode:a}))):r?(e(We({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(k(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(k(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(k(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Qe({classesToFilterOut:a})):e(Xe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):I(o.selectedReportID)?e(qe({projectsToFilterOut:a})):e($e({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():Ye()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(He(a))},onUpdateReportFormat:a=>{za(e),e(Ge(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Aa);function Ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=De(),s=Oe(),t=W(),{tenantEmailDomain:r}=Fe(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(N.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,C]=u.useState(!1),[Z,fe]=u.useState(!1),{isFeatureEnabled:Q}=l(N.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const U=d((n=>$(n))),me=U.masterTOSInfo?.isMasterTOSAccepted??!1,ue=U.company?.companyInfo.firstMonthOfFY??1,be=Ba(Q?U?.companyId:void 0),w=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:b}=Ra(),D=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),g=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),Ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(C(!0),s(F(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!Z&&w==="Completed"&&b&&(s(F(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,w,b]),u.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(D){case"profit_and_loss":case"profit_and_loss_by_classes":s(Be(h.timeframe));break;case"profit_and_loss_by_projects":g&&s(ie());break;case"balance_sheet":s(Me(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(A());break;case"cash_flow":s(Le(h.timeframe))}}),[c,D,O,b,T,g]);const X=Ta(),we=X?.loggedInUserRole!=null&&ve(X?.loggedInUserRole)!==!0,[ge,Se]=u.useState(!1),J=n=>{Se(n)},Ie=ka(),Re=ja();return(function(n){const{isDataReady:Te}=n,{pathname:ke}=W(),K=Ca(ke??"")==="reports",je=wa(Te),Ue=u.useMemo((()=>K?xa:void 0),[K]);ga({canFetchSuggestedQuestions:je,pageContexts:Ue})})({isDataReady:w==="Completed"}),Ua({isDataReady:w==="Completed"}),p.jsxs(p.Fragment,{children:[w==="Completed"?p.jsx(Da,{analytics:q,onLoad:n=>n.trackPageLoaded(Oa.Event.reports)}):null,p.jsx(Va,{isAppContentDrawerOpen:ge,handleDrawerToggle:J}),p.jsx(Ga,{firstMonthOfFY:ue,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:Ce,selectedReportID:D,analytics:q,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:J,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Fa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Q,initialOpenThreadRequest:be})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>$(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o(N.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(Ma,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ha,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-CkQ2CY6T.js";import{z as w,a6 as v,h as f,N as S,d_ as E,O as k,y as I}from"./index-juRht-9c.js";import"./mui-FQy08n5j.js";import g from"./NotFoundScreen-ButYFiTG.js";import{a as m}from"./sentry-Lj2WEO6K.js";import{u as C,j as h,h as F,g as L,l as _,n as T,o as u,N as y}from"./core-CiFsHd3i.js";import{fB as U,a13 as j,a14 as p,D6 as P,pX as V,a15 as z,D4 as B}from"./zeni-epic-state-BdFiPfcm.js";import"./recharts-CYbL6OhC.js";import"./analytics-CqoRAkB1.js";import"./plaid-Dw5LGskq.js";import"./dnd-jcX4BW0a.js";import"./stripe-cKAAJElX.js";import"./lottie-cUBeCDOE.js";import"./lexical-DBiumTDC.js";import"./pdf-C6cPvWx8.js";import"./utils-DsJsAXTJ.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]="83c76056-2926-465c-9cb7-ee29ca244657",e._sentryDebugIdIdentifier="sentry-dbid-83c76056-2926-465c-9cb7-ee29ca244657")}catch{}})();const G=_((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(B())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(E),O=()=>{const e=C(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=h((o=>U(o))),c=F(),x=L(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),b=d?.firstName!=null?d.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(v,{analytics:f,onLoad:o=>(N=>N.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:c,location:x,currentTenant:r,companyName:D,userName:b,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(u,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(u,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(g,{})}),a.jsx(u,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-ButYFiTG.js","assets/sentry-Lj2WEO6K.js","assets/core-CiFsHd3i.js","assets/zeni-epic-state-BdFiPfcm.js","assets/index-juRht-9c.js","assets/mui-FQy08n5j.js","assets/analytics-CqoRAkB1.js","assets/utils-DsJsAXTJ.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-BruAIMYU.js","assets/withTransactionSidePanel-BjLmCRfl.js","assets/useAskAiCfoHostNavButtonProps-Dhoa0fnv.js","assets/TransactionDetailScreen-srWo_3sK.js","assets/decodeURIComponentSafe-FYjI-TwW.js","assets/useInitialThreadRequest-D-SxLs4P.js","assets/routePaths-DqksJ4i_.js","assets/expenseAutomationHelper-R2jHKv-Z.js","assets/analyticsHelper-Cjtujqyf.js","assets/CompanyPassportScreen-BKrZbZ6U.js","assets/MobileAppDrawer-BAV0ejOs.js","assets/InboxNotificationsProvider-55rQDTXA.js","assets/useTaskManagerAccess-BrCmQLIc.js","assets/useAiCfoDashboardSuggestedQuestionsChips-B3XyU0Fo.js","assets/FeaturePreviewScreen-DRMNz052.js","assets/BillPayRoutes-BcTRlRv8.js","assets/AddressScreen-Dmypz8Cm.js","assets/DomesticWireDetailScreen-DhMVIfNi.js","assets/BusinessVerificationPageScreen-DzWgqXwG.js","assets/DrawerScreen-CbY0_Vl5.js","assets/SetupPagesScreen-CPUD_j1y.js","assets/BillPayApprovalRoutes--ALQ35-1.js","assets/ReimbursementApprovalRuleDetailScreen-lyJcYNIg.js","assets/getLocaleForTenant-CRduVQsY.js","assets/ReimbursementRoutes-BQ18gzav.js","assets/ReimbursementApprovalRoutes-DW0hPEhv.js","assets/TransactionListRoutes-CpBDr1qT.js","assets/ZeniAccountStatementScreen-BgOPM6A3.js","assets/SettingsRoutes-DU6XdEOY.js","assets/AccountMappingScreen-UdzIeE_v.js","assets/QBOConnectionScreen-BmXy-56M.js","assets/empty-4iGv0vIv.js","assets/index-CVbu1_bp.js","assets/url-DhKb0GNI.js","assets/index-Cz99TrBA.js","assets/accountMappingHelper-CAg2qsF3.js","assets/useEmailConnectResultRefresh-DpIv7GW3.js","assets/ReportsRoutes-iapNY-Ca.js","assets/ChargeCardRoutes-BjIdSbvb.js","assets/useChargeCardPusherEvents-YQlWLN09.js","assets/PeopleRoutes-BsxSMUvq.js","assets/ExpenseAutomationRoutes-Dll0r-g6.js","assets/TreasuryRoutes-Ja8FQwZH.js","assets/VendorsRoutes-CoiOEvIl.js","assets/pathToGoBack-DWIhT07R.js","assets/ZeniAccountRoutes-BjLND6jg.js","assets/AddressRoutes-CaXv_Hc-.js","assets/PandLWithForecastRoutes-Diz_Rn8O.js","assets/CustomerOnboardingRoutes-3cZyVkRN.js","assets/TransactionDetailRoutes-CaIXvpDL.js","assets/EntityDetailRoutes-DpM6LjT5.js","assets/InvoicingRoutes-B8ytNofm.js","assets/NotificationRoutes-jy7KSYzl.js","assets/PerformanceRoutes-DFKVpzlk.js","assets/RewardsRoutes-CO35jNo-.js","assets/TaskRoutes-C-JJtR4s.js","assets/TaskListScreen-BH2rdLa7.js","assets/AiCfoScreen-DNghBGiO.js","assets/CardsAiCfoScreen-C_lk15md.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as cs,fB as ms,dV as _s,dU as Es,Aj as hs,de as ps,gG as gs,g5 as xs,db as pe,cF as Rs,gj as Is,cx as js,bE as Ts,br as As,Tp as bs,v as fs,Tr as ys,bq as Ds,Ts as Cs,bK as vs,bJ as Os,bt as Ps,ct as Us,Tt as ws,Tu as Fs,d6 as Ls,d9 as Vs,d8 as Hs,cE as ks,cL as Bs,pO as ge,ge as xe,gV as Ss,gg as Re,gI as Ie,gJ as je,gh as Ns}from"./zeni-epic-state-BdFiPfcm.js";import{j as e}from"./liveblocks-CkQ2CY6T.js";import{a as U}from"./sentry-Lj2WEO6K.js";import{N as u,u as Ms,h as Zs,i as Gs,g as $s,j as $,q as Te,n as zs,o as t}from"./core-CiFsHd3i.js";import{H as l,E as qs,u as Ys,z as y,O as Js,d as Ws,n as Ks,y as M,f as Qs,I as Xs,V as en,L as F,G as Ae,t as _,P as sn,J as nn,h as ne}from"./index-juRht-9c.js";import"./mui-FQy08n5j.js";import{f as be}from"./analyticsHelper-Cjtujqyf.js";import{t as tn}from"./getLocaleForTenant-CRduVQsY.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="b9cfb2b4-695b-4e1b-959d-6b91d115e1fb",a._sentryDebugIdIdentifier="sentry-dbid-b9cfb2b4-695b-4e1b-959d-6b91d115e1fb")}catch{}})();const an=l((()=>s((()=>import("./NotFoundScreen-ButYFiTG.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),on=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),rn=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),fe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),D=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(De,{tenantEmailDomain:v})}return a?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(De,{tenantEmailDomain:v}):A?e.jsx(rn,{tenantEmailDomain:v}):B?e.jsx(on,{tenantEmailDomain:v}):e.jsx(an,{})},ln={dashboard:()=>s((()=>import("./DashboardRoutes-BruAIMYU.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-BcTRlRv8.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-BQ18gzav.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-CpBDr1qT.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-DU6XdEOY.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-iapNY-Ca.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-BjIdSbvb.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-BsxSMUvq.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-Dll0r-g6.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-Ja8FQwZH.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-CoiOEvIl.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BjLND6jg.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},un=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},dn=l((()=>s((()=>import("./ReportsRoutes-iapNY-Ca.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),cn=l((()=>s((()=>import("./AddressRoutes-CaXv_Hc-.js")),__vite__mapDeps([55,1,2,3,25,4,5,6,7,0,8])))),mn=l((()=>s((()=>import("./PeopleRoutes-BsxSMUvq.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),_n=l((()=>s((()=>import("./PandLWithForecastRoutes-Diz_Rn8O.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),En=l((()=>s((()=>import("./CustomerOnboardingRoutes-3cZyVkRN.js")),__vite__mapDeps([57,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),hn=l((()=>s((()=>import("./VendorsRoutes-CoiOEvIl.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])))),pn=l((()=>s((()=>import("./TransactionDetailRoutes-CaIXvpDL.js")),__vite__mapDeps([58,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-DpM6LjT5.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),gn=l((()=>s((()=>import("./DashboardRoutes-BruAIMYU.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-BcTRlRv8.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),xn=l((()=>s((()=>import("./SettingsRoutes-DU6XdEOY.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),Rn=l((()=>s((()=>import("./InvoicingRoutes-B8ytNofm.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-BQ18gzav.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),In=l((()=>s((()=>import("./ZeniAccountRoutes-BjLND6jg.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),jn=l((()=>s((()=>import("./TreasuryRoutes-Ja8FQwZH.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),Tn=l((()=>s((()=>import("./TransactionListRoutes-CpBDr1qT.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),An=l((()=>s((()=>import("./ChargeCardRoutes-BjIdSbvb.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),bn=l((()=>s((()=>import("./NotificationRoutes-jy7KSYzl.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,11,21,8])))),fn=l((()=>s((()=>import("./PerformanceRoutes-DFKVpzlk.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,19,20,21,8])))),yn=l((()=>s((()=>import("./ExpenseAutomationRoutes-Dll0r-g6.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])))),Dn=l((()=>s((()=>import("./RewardsRoutes-CO35jNo-.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,0,8])))),Cn=l((()=>s((()=>import("./TaskRoutes-C-JJtR4s.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,14,19,20,21,65,11,8])))),vn=l((()=>s((()=>import("./AiCfoScreen-DNghBGiO.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,22,53,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-C_lk15md.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-ButYFiTG.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),On=l((()=>s((()=>import("./TaskListScreen-BH2rdLa7.js").then((a=>a.f))),__vite__mapDeps([65,1,2,3,4,5,6,7,11,19,20,21,8])))),Pn=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:H})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return v===!0&&H?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Sn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Ms(),B=Zs(),{tenantEmailDomain:i}=Gs(),V=qs().mode,{setLoading:O,clearAllLoading:v,clearLoading:H}=Ys(),b=y.getSignedInUserTenant(i)?.tenantId,j=y.getSignedInUser(),W=cs(j),z=$s(),[L,we]=U.useState(!1),r=$((o=>ms(o))),{useFeatureGate:S}=Js(),Z=Ws(),ae=Ks(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=S(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=S(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?_s(oe,r):void 0,K=p==="Completed"||T==="Completed"?Es(r):void 0,re=p==="Completed"||T==="Completed"?hs(r)&&!ps(r):void 0,He=Qs(r,Ve,oe),{isCardsHidden:ke}=Xs(r?.tenantId),Be=!He||!!ke,{isFeatureEnabled:Se}=S(M.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=S(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=S(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||nn==="DEV",q=$((o=>gs(o)));if(i!=null){const o=y.getSignedInUserTenant(i);j!=null&&o!=null&&be(j,r,V)}const G={tenantId:b,userId:j?.userId,sessionId:j?.zeniSessionId},ie=xs(),h=en(),Ze=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),Ge=Rs(h?.loggedInUserRoleMap),X=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),$e=$((o=>G.tenantId!=null?Is(o,G.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),U.useEffect((()=>{if(ee!=null&&b!=null){const o=ee.params.selectedPeriod;if(o!=null){const f=o.split("-");if(f.length===2){const d=js(Number(f[0])),n=Number(f[1]),c=Ts(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=As();c.isAfter(N,"month")===!1?A(bs(b,{month:d,year:n})):B(`/${i}/month_end_close_checks/review`)}}}}),[ee,b]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,G,ie,j,A,y]),U.useLayoutEffect((()=>{!fs(ie,G)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,n){if(xe(f?.userId,f?.zeniSessionId,o.tenantId),d(Ss(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=y.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(tn(n)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})(G,j,A,$e))}),[b]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,n,c,N,k){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const Y=n!=null&&c?.zeniSessionId!=null,ls=d==null||d.tenantId!==n,us=d!=null&&d.excludedResources==null,ds=d!=null&&d.externalConnections==null;if(Y&&ls){k(Re(n));const J=y.getSignedInUserTenantWithId(n);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),k(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),k(je(c.userId,n)))}else Y&&us&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),k(Ie(c.userId,n))),Y&&ds&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),k(je(c.userId,n)));if(Y){ne.identify(c.userId,{tenant_id:n});const J=n==null||n!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),k(Ns(c.userId,n,c.zeniSessionId))),J&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(ge(c.userId,c.zeniSessionId)))}})(T,p,r,b,j,O,A))}),[b,p]),U.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),y.saveSignedInUserTenants(ys(q.tenantsBaseInOrder)),j!=null&&be(j,r,V,void 0,q.tenantsBaseInOrder))}),[q,T,r,j]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=un,f=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=ln[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),f)})())}),[p,L]);const P=r?.userRole!=null&&Ds(r?.userRole),{isFeatureEnabled:ze}=S(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ye=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,Je=Cs(h?.loggedInUserRoleMap),We=r.externalConnections?.accounting[0]?.isValid,Ke=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&vs(h?.loggedInUserRoleMap),_e=Fe&&!P,Qe=Le&&!P,Xe=ue&&Os(h?.loggedInUserRoleMap),es=de&&Ps(h?.loggedInUserRoleMap),ss=_e&&Us(h?.loggedInUserRoleMap),ns=ws(h?.loggedInUserRoleMap),ts=Fs(h?.loggedInUserRoleMap),as=Ls(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),g=ks(h?.loggedInUserRoleMap),x=Bs(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&as,I=Qe&&os,m=de&&rs,is=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||Ge===!0||Je===!0||ns===!0||ts===!0;return y.isSignedIn()?b==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(j!=null&&T!=="In-Progress"&&A(ge(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||W&&!X)&&Ke&&We!==!0&&E===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||X||W?!L||se!==!1||X||W?L&&r?.userRole&&E!=null&&K!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(zs,{children:e.jsxs(t,{element:e.jsx(sn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Pn,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:w?e.jsx(gn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:w?e.jsx(dn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:is||w?e.jsx(mn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:w?e.jsx(_n,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(En,{})}),e.jsx(t,{path:"transaction/*",element:w&&P===!1||qe||Ye?e.jsx(pn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:w&&P===!1?e.jsx(Tn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(On,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(Cn,{})}),e.jsx(t,{path:"address/*",element:Xe||me||ss||es?e.jsx(cn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(In,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:I?e.jsx(jn,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(fn,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(yn,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(bn,{})}),e.jsx(t,{path:"vendors/*",element:Ze?e.jsx(hn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Se?e.jsx(xn,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me?e.jsx(Rn,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:ze?e.jsx(Dn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(vn,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{D as F,Sn as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-CkQ2CY6T.js";import{a as d}from"./sentry-Lj2WEO6K.js";import{h as N,g as Z,u as T,i as V,j as C,l as H,n as z,o as k}from"./core-CiFsHd3i.js";import{fB as w,YA as je,MU as ve,Y8 as we,Yh as Ae,c7 as W,cQ as De,cR as Ue,bq as Te,da as Re,Ff as _e,YB as Me,Ol as Be,LL as Fe,LC as de,Lz as Le,Fj as ue,LF as pe,LI as ge,LO as X,Bv as ee,Fi as Oe,lq as G,lt as me,YC as Ne,mD as Ve,FB as Ye,UQ as $e,UR as Ge,lo as Ze,YD as He,lr as Ke,t$ as Qe,UL as qe,UM as ze,u3 as Je,hS as We,TL as q,hK as ae,hH as Xe,hP as en,TM as nn,Fy as tn,YE as an,YF as on,M0 as sn,lX as rn,dU as fe,dV as he,YG as ln,gz as cn,T_ as dn,Fx as oe,gE as se,gD as un,Fw as pn,gC as gn,gB as mn,YH as fn,Te as Ce,YI as hn,YJ as Cn,YK as yn,YL as Sn,YM as bn,YN as In,FE as xn,YO as En,Fv as ie,Fp as $,YP as kn,YQ as Pn,YR as re,YS as jn,dN as vn,YT as wn,YU as An,YV as Dn,To as Un,b$ as Tn,c6 as Rn,c5 as _n,c0 as Mn,YW as Bn,c3 as Fn,c2 as Ln,c4 as On,c1 as Nn}from"./zeni-epic-state-BdFiPfcm.js";import{bQ as Vn,z as v,V as Y,a5 as ne,c0 as Yn,h as K,O as te,y as L,f as ye,I as Se,c1 as $n,g as Gn,T as be,c2 as Zn,ag as Hn,c3 as Kn,c4 as Qn,ao as qn,c5 as zn,p as Jn,c as Ie,c6 as Wn}from"./index-juRht-9c.js";import{n as B}from"./mui-FQy08n5j.js";import{u as xe}from"./useTaskManagerAccess-BrCmQLIc.js";import{U as Xn}from"./AccountMappingScreen-UdzIeE_v.js";import{t as et,A as nt}from"./AddressScreen-Dmypz8Cm.js";import O from"./NotFoundScreen-ButYFiTG.js";import{g as tt}from"./analyticsHelper-Cjtujqyf.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-DzWgqXwG.js";import{C as st}from"./CompanyPassportScreen-BKrZbZ6U.js";import{M as _}from"./MobileAppDrawer-BAV0ejOs.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-DpIv7GW3.js";import{q as le}from"./QBOConnectionScreen-BmXy-56M.js";import{B as lt}from"./BillPayApprovalRoutes--ALQ35-1.js";import{R as ct}from"./ReimbursementApprovalRoutes-DW0hPEhv.js";import"./recharts-CYbL6OhC.js";import"./analytics-CqoRAkB1.js";import"./plaid-Dw5LGskq.js";import"./dnd-jcX4BW0a.js";import"./stripe-cKAAJElX.js";import"./lottie-cUBeCDOE.js";import"./lexical-DBiumTDC.js";import"./pdf-C6cPvWx8.js";import"./utils-DsJsAXTJ.js";import"./accountMappingHelper-CAg2qsF3.js";import"./routePaths-DqksJ4i_.js";import"./InboxNotificationsProvider-55rQDTXA.js";import"./empty-4iGv0vIv.js";import"./pdf-lib-C9DR7g8H.js";import"./index-CVbu1_bp.js";import"./url-DhKb0GNI.js";import"./index-Cz99TrBA.js";import"./decodeURIComponentSafe-FYjI-TwW.js";import"./ReimbursementApprovalRuleDetailScreen-lyJcYNIg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="edef6929-ab45-4d52-aaf8-753c9ac33aa6",e._sentryDebugIdIdentifier="sentry-dbid-edef6929-ab45-4d52-aaf8-753c9ac33aa6")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as a}from"./liveblocks-mJJR3MsR.js";import{a as d}from"./sentry-CItQHKp
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ut=H((function(e,l){const o=w(e),i=we(e),r=Ae(e),n=l.roleMap.bill_pay_admin;return{isDisabled:(
|
|
9
|
+
`,ut=H((function(e,l){const o=w(e),i=we(e),r=Ae(e),n=l.roleMap.bill_pay_admin;return{isDisabled:(W(o?.userRole??[])||n)&&"readonly",billpayApprovalView:i,remiApproverView:r,analytics:K}}),(function(e,l){const{navigate:o,currentTenant:i}=l;return{onSetupApprovalRulesBillPaySectionClick:()=>{o("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{o("reimbursements/approval-rules")},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))(Yn),pt=()=>{const e=N(),l=Z(),o=T(),{tenantEmailDomain:i}=V(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),c=C((g=>w(g)));at();const u=C((g=>g.remiSetupApproverViewState.fetchState)),h=C((g=>je(g))),{isApprovalRulesV3Enabled:S,isLoading:m}=Vn(c?.tenantId),p=c.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const b=Y();d.useEffect((()=>{t||u!=="Not-Started"||m||c?.tenantId==null||(s(!0),o(ve(!0,!1,!1,S)))}),[t,u,m,S,c?.tenantId,o]);const E=g=>{n(g)};return b?.loggedInUserRoleMap!=null?a.jsxs(dt,{children:[a.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:E}),a.jsx(ut,{navigate:e,location:l,companyId:p,currentTenant:c,roleMap:b.loggedInUserRoleMap,onClickMenuIcon:()=>{E(!0)}})]}):a.jsx(ne,{fetchState:h.fetchState})},gt=B.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100%;
|
|
12
12
|
width: 100%;
|
|
@@ -14,7 +14,7 @@ import{j as a}from"./liveblocks-mJJR3MsR.js";import{a as d}from"./sentry-CItQHKp
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,mt=H((function(e,l){const{companyId:o,isZeniAccountEnabled:i,isChargeCardEnabled:r,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:s}=l,c=w(e);return{bankSetupView:Me(e,o,n,t,i,r,s),connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:K}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t,s)=>{e(ee(t,n,s))},onEstablishConnectionClick:(n,t,s)=>{e(
|
|
17
|
+
`,mt=H((function(e,l){const{companyId:o,isZeniAccountEnabled:i,isChargeCardEnabled:r,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:s}=l,c=w(e);return{bankSetupView:Me(e,o,n,t,i,r,s),connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:K}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t,s)=>{e(ee(t,n,s))},onEstablishConnectionClick:(n,t,s)=>{e(X(n,r,t,s))},onUpdatePaymentAccountStatus:(n,t,s,c,u)=>{e(ge(n,t,u,c,s))},onUpdatePaymentAccountLoginStatus:(n,t,s,c)=>{e(pe(!1,n,c,s,t))},onEstablishConnectionSuccess:(n,t)=>{e(ue(t,n))},onUpdateAccountClick:(n,t,s,c,u)=>{e(u==="paymentAccount"?de(n,t,s,c):Le(c,n,t))},onUpdatePrimaryFundingAccount:(n,t,s)=>{e(Fe(r,t,n,s))},onRemoveConnection:n=>{e(Be(n))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))($n),ft=()=>{const e=N(),l=Z(),o=T(),{tenantEmailDomain:i}=V(),r=Y(),{useFeatureGate:n}=te(),{isFeatureEnabled:t}=n(L.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=n(L.isDebitCardFeatureEnabled),[c,u]=d.useState(!1),[h,S]=d.useState(!1),m=C((A=>w(A))),p=C((A=>A.settingsViewState.bankConnection.fetchState)),b=De(m,r?.loggedInUserRoleMap),E=Ue(m,r?.loggedInUserRoleMap),g=m?.userRole!=null&&Te(m.userRole),j=!!m.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!g,P=m.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!g,R=ye(m,t,s),D=Re(m,r?.loggedInUserRoleMap)&&R,{isCardsHidden:I}=Se(m?.tenantId),x=m.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");d.useEffect((()=>{h||p==="Completed"||(S(!0),o(_e(!1)))}),[h,o,p]);const M=A=>{u(A)};return b||j||E||D?a.jsxs(gt,{children:[a.jsx(_,{isAppContentDrawerOpen:c,handleDrawerToggle:M}),a.jsx(mt,{navigate:e,location:l,companyId:x,currentTenant:m,roleMap:r.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:E,isZeniAccountEnabled:j,isChargeCardEnabled:D,isChargeCardsHidden:I,isTreasuryEnabled:P,onClickMenuIcon:()=>{M(!0)}})]}):a.jsx(O,{})},ht=B.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
height: 100%;
|
|
20
20
|
width: 100%;
|
|
@@ -22,7 +22,7 @@ import{j as a}from"./liveblocks-mJJR3MsR.js";import{a as d}from"./sentry-CItQHKp
|
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
align-items: center;
|
|
24
24
|
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,Ct=H((function(e,l){const{companyId:o}=l,i=w(e),r=l.roleMap.bill_pay_admin,n=Ne(e,o),{uiState:t}=n,s=(
|
|
25
|
+
`,Ct=H((function(e,l){const{companyId:o}=l,i=w(e),r=l.roleMap.bill_pay_admin,n=Ne(e,o),{uiState:t}=n,s=(W(i?.userRole??[])||r)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:be.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:s,analytics:K}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t)=>{e(ee("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(X(n,r,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,s)=>{e(ge(n,t,"billing","billing_setup",s))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(pe(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(de(n,t,"billing","billing_setup"))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(Ke(n))},updateCardPaymentModalState:n=>{e(He({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,s)=>{e(Ze(n,t,s))},handleFetchPaymentSources:()=>{e(G())},resetCardPaymentViewState:()=>{e(Ge())},handleResetCardPaymentErrorStatuses:()=>{e($e())},onBillingAddressSave:n=>{e(Ye(n))},onAddressEditHandler:n=>{if(n!=null){const t=et(n);e(Ve({addressType:"subscription_billing_address",addressToCreate:t}))}}}}))(Zn),yt=()=>{const e=N(),l=Z(),o=T(),{tenantEmailDomain:i}=V(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),[c,u]=d.useState(!1),h=C((P=>w(P))),S=C((P=>P.cardPaymentViewState)),m=C((P=>P.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState)),p=Gn(S.addCardPaymentSourceStatus.fetchState),b=S.addCardPaymentSourceStatus.fetchState,E=h.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const g=Y();d.useEffect((()=>{E!=null&&o(Oe(E,!1))}),[E,o]),d.useEffect((()=>{t||(s(!0),o(G()))}),[t,o]),d.useEffect((()=>{c||(me(["card"]),u(!0))}),[c]),d.useEffect((()=>{p==="In-Progress"&&b==="Completed"&&o(G())}),[p,b]);const j=P=>{n(P)};return g?.loggedInUserRoleMap!=null?a.jsxs(ht,{children:[a.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:j}),a.jsx(Ct,{navigate:e,location:l,companyId:E,currentTenant:h,roleMap:g.loggedInUserRoleMap,onClickMenuIcon:()=>{j(!0)},googleAPIKey:be.googleMapsAPIKey})]}):a.jsx(ne,{fetchState:m})},J="external_integrations",St=H((function(e){const l=ze(e,J);return{notifyMeRegisteredSlugs:new Set(l.map((o=>o.additionalInfo)).filter((o=>o!=null)))}}),(function(e,l){const{navigate:o,integrationsView:i,signedInUserEmail:r,tenantEmailDomain:n,tenantId:t}=l;return{onBackClick:()=>{o("../")},onNavigateToDashboard:()=>{o("../dashboard")},onReconnectQBO:()=>{le.init("/connection/auth",n),le.handleClick()},onRefreshClick:()=>{i.integrations.refreshQBO.fetchState!=="In-Progress"&&e(tn())},onSaveChargeBeeCredentials:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="chargebee"))?.connectionId;u!=null&&e(en(t,u,q("revenue"),nn("chargebee"),{api_key:s,site:c}))},onConnectHubSpot:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="hubspot"))?.connectionId;if(u!=null){const h=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:s,client_secret:c,connection_id:u,redirect_uri:h,tenant_id:t}));const S="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(s)}&scope=${encodeURIComponent(S)}&redirect_uri=${encodeURIComponent(h)}`}},onDisconnect:(s,c)=>{e(Xe(t,s,q(c)))},onConnectGmail:()=>{e(ae(t,"gmail",window.location.href))},onConnectOutlook:()=>{e(ae(t,"outlook",window.location.href))},onSaveConnectorCredentials:s=>{e(We(t,q("payments"),s))},onNotifyMe:s=>{K.trackIntegrationsNotifyMeClicked("Settings",s),e(Je(J,s,r))}}}))(Kn),bt=()=>{const e=Hn(),l=N(),o=T(),{tenantEmailDomain:i}=V(),{pendingAutoFocusTabId:r}=it(),[n,t]=d.useState(!1),s=C((I=>I.tenantState.fetchState)),c=C((I=>w(I))),u=c.companyId??v.getSignedInUserTenant(i)?.companyId,h=v.getSignedInUser(),S=Y(),m=W(c.userRole??[]);if(h==null)throw Error("Can't access Integrations page without signing in...");d.useEffect((()=>{o(Qe(J))}),[o]);const[p,b]=d.useState(!1);d.useEffect((()=>{p||(b(!0),o(G()))}),[p,o]);const E=I=>{t(I)},g=C((I=>qe(I,u))),j=C((I=>I.plaidAccountViewState.external_account.plaidConnectionDetails)),{plaidAccounts:P,onAddPlaidAccount:R,onReLoginPlaidAccount:D}=rt({companyId:u??c.companyId});return S?.loggedInUserRoleMap!=null?a.jsxs(It,{children:[a.jsx(_,{isAppContentDrawerOpen:n,handleDrawerToggle:E}),a.jsx(St,{navigate:l,meetingUrl:e("settings_integrations"),onClickMenuIcon:()=>{E(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:h.userEmail??"",tenantEmailDomain:c.tenantEmailDomain??i??"",tenantId:c.tenantId,saveChargeBeeState:g.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:g.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:g.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:g.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:g.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(g.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([I,x])=>[I,x?.message]))),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:s==="In-Progress",autoFocusTabId:r??void 0,plaidAccounts:P,onAddPlaidAccount:R,onReLoginPlaidAccount:D,plaidConnectionDetails:j})]}):a.jsx(ne,{fetchState:s})},It=B.div`
|
|
26
26
|
display: flex;
|
|
27
27
|
height: 100%;
|
|
28
28
|
width: 100%;
|
|
@@ -38,7 +38,7 @@ import{j as a}from"./liveblocks-mJJR3MsR.js";import{a as d}from"./sentry-CItQHKp
|
|
|
38
38
|
flex-direction: column;
|
|
39
39
|
align-items: center;
|
|
40
40
|
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,Et=()=>{const e=T(),{tenantEmailDomain:l}=V(),[o,i]=d.useState(!1),r=C((p=>w(p))).companyId??v.getSignedInUserTenant(l)?.companyId,n=v.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=C((p=>an(p,n.userId))),s=C((p=>on(p,r,"bill_pay","user_reimbursement_account"))),{plaidConnectionDetails:c}=s,u=p=>{i(p)},h=d.useCallback((p=>{e(ee("user_reimbursement_account",p))}),[]),S=d.useCallback((p=>{e(
|
|
41
|
+
`,Et=()=>{const e=T(),{tenantEmailDomain:l}=V(),[o,i]=d.useState(!1),r=C((p=>w(p))).companyId??v.getSignedInUserTenant(l)?.companyId,n=v.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=C((p=>an(p,n.userId))),s=C((p=>on(p,r,"bill_pay","user_reimbursement_account"))),{plaidConnectionDetails:c}=s,u=p=>{i(p)},h=d.useCallback((p=>{e(ee("user_reimbursement_account",p))}),[]),S=d.useCallback((p=>{e(X(p,r,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))}),[]);d.useEffect((()=>{t.fetchState!=="Completed"&&t.fetchState!=="In-Progress"&&e(sn(n.userId))}),[n.userId,t.fetchState]);const m=t.fetchState==="Not-Started"||t.fetchState==="In-Progress";return a.jsxs(xt,{children:[a.jsx(_,{isAppContentDrawerOpen:o,handleDrawerToggle:u}),a.jsx(Qn,{plaidConnectionDetails:c,isLoading:m,myBankConnectionsView:t,onFetchLinkTokenClick:h,onEstablishConnectionClick:S,onClickMenuIcon:()=>{u(!0)}})]})},kt=B.div`
|
|
42
42
|
display: flex;
|
|
43
43
|
height: 100%;
|
|
44
44
|
width: 100%;
|
|
@@ -46,4 +46,4 @@ import{j as a}from"./liveblocks-mJJR3MsR.js";import{a as d}from"./sentry-CItQHKp
|
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: center;
|
|
48
48
|
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,ce=({appContent:e})=>{const l=T(),o=N(),i=
|
|
49
|
+
`,ce=({appContent:e})=>{const l=T(),o=N(),i=Z(),[r,n]=d.useState(!1),t=C((y=>w(y))),{tenantEmailDomain:s}=t,c=t.companyId??v.getSignedInUserTenant(s)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:u}=te(),h=!!t.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:S}=u(L.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=u(L.isDebitCardFeatureEnabled),p=t.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",b=C((y=>rn(y))),E=fe(t),g=he(m,t),j=!g&&b,P=ye(t,S,m),{isCardsHidden:R}=Se(t?.tenantId),D=!P||R,{areTenantIdsInSync:I}=qn();d.useEffect((()=>{I&&l(ln(c,j))}),[c,l,j,I]);const x=C((y=>cn(y,j))),M=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||c==null,A=dn(t),f=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=y=>{n(y)};return a.jsxs(kt,{children:[a.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:U}),e!=null?a.jsx(a.Fragment,{children:e}):a.jsx(zn,{myProfileView:x,isAccountingClassesEnabled:b,isReimbursementDisabled:f===!1,isZeniAccountsDisabled:h===!1,isChargeCardDisabled:D,isTreasuryDisabled:p===!1,isLiteRoleDisabled:A===!1,onClickMenuIcon:()=>{U(!0)},isLoading:M,isBankingOnlyTenant:g,isCardsOnlyTenant:E,onAddressClick:y=>{const F=(function(ke,Pe){let Q=`/${ke}/settings/my_profile`;return Q=Q.concat(`/new/${Pe}`),Q})(s,y),Ee=Jn(i.state?.pathnameStackToGoBack,i.pathname);o(F,{state:{pathnameStackToGoBack:Ee}})},onGetOtp:y=>{const F={...x.myProfileLocalData,phone:y};l(oe({localData:F})),l(mn(y,"MyProfile"))},onResendOtp:y=>{l(gn(y,"MyProfile"))},onCancelClick:()=>{l(pn())},onSaveClick:()=>{l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(y,F)=>{l(un(y,F,"MyProfile"))},onVerifyOtpSuccess:y=>{y!=null&&v.saveZeniOtpToken(y),l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:y=>{l(oe({localData:y}))}})]})};function Pt(){const e=T(),l=C((f=>w(f))),o=l.companyId,i=l.tenantId,r=C((f=>fn(f))),n=C((f=>Ce(f))),t=C((f=>hn(f.notificationRegistryState))),s=C((f=>Cn(f))),c=C((f=>yn(f))),u=Ie(),{isZeniUser:h,isNotificationControlsEnabled:S}=xe(u),[m,p]=d.useState(!1),b=d.useCallback((f=>{p(f)}),[]),E=d.useCallback((f=>{e(Sn(f))}),[]),g=d.useCallback((()=>{u?.userEmail!=null&&e(bn({loggedInUserEmail:u.userEmail})),e(In())}),[u?.userEmail]),j=d.useCallback((()=>{e(xn()),c&&e(En())}),[c]);if(u==null)throw Error("Can't access Notification Settings page without signing in...");const P=d.useCallback((()=>{const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o)),e($())}),[o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled]),R=d.useCallback((()=>{e(kn())}),[]),D=d.useCallback(((f,U,y)=>{e(Pn({eventId:f,channel:re(U),enabled:y}))}),[e]),I=d.useCallback(((f,U)=>{e(jn({groupId:f,frequency:vn(U)}))}),[e]),x=d.useCallback(((f,U,y)=>{e(wn({groupId:f,channel:re(U),enabled:y}))}),[e]),M=d.useMemo((()=>{if(S&&t!=null)return{isZeniUser:h,registry:t,preferences:s,onToggleEventChannel:D,onSetGroupFrequency:I,onSetGroupChannelMaster:x}}),[S,h,t,s,D,I,x]);d.useEffect((()=>{i!=null&&n.fetchState==="Not-Started"&&e($())}),[e,i,n.fetchState]);const A=d.useRef(i);return d.useEffect((()=>{A.current!==i&&(e(An()),e(Dn()),e($()),A.current=i)}),[e,i]),d.useEffect((()=>{if(n.fetchState==="Completed"&&r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"){const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o))}}),[r.fetchState,o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled,n.fetchState]),a.jsxs(a.Fragment,{children:[a.jsx(_,{isAppContentDrawerOpen:m,handleDrawerToggle:b}),a.jsx(Wn,{notificationSettingsView:r,onFormDataChange:E,onCancel:g,onSave:j,onClickMenuIcon:()=>{b(!0)},signedInUser:u,onRefresh:P,resetUpdateStatus:R,taskNotifications:M,isTaskNotificationsDirty:c})]})}function da(e){const[l,o]=d.useState(!1),i=C((b=>Ce(b))),r=C((b=>w(b))),n=Y(),t=Ie(),s=T(),{useFeatureGate:c}=te(),{isFeatureEnabled:u}=c(L.isDebitCardFeatureEnabled),{isTaskManagerAccessEnabled:h}=xe(t),S=t?.userEmail==null||i.fetchState!=="Completed"||Un(i.notificationSettings,t.userEmail,u,r,h);d.useEffect((()=>{i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"&&l===!1&&(o(!0),s($()))}),[i.fetchState,l]);const m=he(u,r),p=fe(r);return i.fetchState!=="In-Progress"&&i.fetchState!=="Not-Started"||S!==!0?Tn(r)?a.jsxs(z,{children:[Rn(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"accounting/*",element:a.jsx(Xn,{})}),_n(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"approval_rules/*",element:a.jsx(jt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Mn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"my_bank_connections",element:a.jsx(Et,{})}),Bn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"bank_connections",element:a.jsx(ft,{})}),Fn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"business_verification",element:a.jsx(ot,{productType:m?"zeni_accounts":p?"charge_cards":tt(r,n?.loggedInUserRoleMap)})}),Ln(n?.loggedInUserRole??[],r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"company_details",element:a.jsx(st,{})}),On(n?.loggedInUserRole??[],r)&&a.jsx(k,{path:"billing",element:a.jsx(yt,{})}),Nn(n?.loggedInUserRole??[],u,r)&&a.jsx(k,{path:"integrations",element:a.jsx(bt,{})}),a.jsx(k,{path:"my_profile/new/:addressType",element:a.jsx(ce,{appContent:a.jsx(nt,{isSubPage:!1})})}),a.jsx(k,{path:"my_profile",element:a.jsx(ce,{})}),S&&a.jsx(k,{path:"notifications",element:a.jsx(Pt,{})}),a.jsx(k,{path:"*",element:a.jsx(O,{})})]}):a.jsx(z,{children:a.jsx(k,{path:"*",element:a.jsx(O,{})})}):null}function jt(e){return a.jsxs(z,{children:[a.jsx(k,{path:"/",element:a.jsx(pt,{})}),a.jsx(k,{path:"bills/approval-rules/*",element:a.jsx(lt,{})}),a.jsx(k,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?a.jsx(ct,{}):a.jsx(O,{})}),a.jsx(k,{path:"*",element:a.jsx(O,{})})]})}export{da as default};
|