@zeniai/web-app-ui 5.3.28-qa → 5.3.29-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-CDcb3dR7.js +9 -0
- package/dist/assets/AddressRoutes-loJi-MTb.js +1 -0
- package/dist/assets/{AddressScreen-pJKlDi3q.js → AddressScreen-KciR_hsZ.js} +2 -2
- package/dist/assets/AiCfoScreen-CL9wzpIP.js +22 -0
- package/dist/assets/AppDrawer-CBFgx_xO.js +10 -0
- package/dist/assets/{BillPayApprovalRoutes-BLyF1vsz.js → BillPayApprovalRoutes-DmmLz8dY.js} +1 -1
- package/dist/assets/{BillPayRoutes-C-gdP6KL.js → BillPayRoutes-C_uGbX5e.js} +9 -9
- package/dist/assets/{BusinessVerificationPageScreen-Boe3kgD5.js → BusinessVerificationPageScreen-CBOgxA4z.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-BBJBV1b_.js → CardsAiCfoScreen-B8SHn0bs.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-CYP3hEhW.js → ChargeCardRoutes-Dkpm3e49.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-wR6Twi6v.js → CompanyPassportScreen-C-SlqPHT.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-C8yz1QVT.js → ConnectionAuthScreen-IHk0kFrL.js} +2 -2
- package/dist/assets/CustomerOnboardingAuthScreen-9EVdL7z6.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CHW2qzKd.js → CustomerOnboardingRoutes-BRdsXEtS.js} +5 -5
- package/dist/assets/{DashboardRoutes-CiwFfaic.js → DashboardRoutes-CLhCpuhB.js} +4 -4
- package/dist/assets/{DefaultTenantHome-B0-M7I8X.js → DefaultTenantHome-Btkw8Ap3.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-Dzk5sa_d.js +18 -0
- package/dist/assets/DrawerScreen-Cq2VoXGn.js +1 -0
- package/dist/assets/EntityDetailRoutes-CTolGUo8.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-Dsuu9sFZ.js +25 -0
- package/dist/assets/FeaturePreviewScreen-h7p9MMUf.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-BTzQvozK.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-B9BL9-5c.js → InboxNotificationsProvider-Y2y35nP6.js} +1 -1
- package/dist/assets/InvoicingRoutes-MDlqxyil.js +2 -0
- package/dist/assets/{MagicLinkRoutes-DDMQyFLn.js → MagicLinkRoutes-CP3vqiHe.js} +7 -7
- package/dist/assets/MagicLinkSignInScreen-BMClM24d.js +12 -0
- package/dist/assets/{MobileAppDrawer-DCgsEnVh.js → MobileAppDrawer-DLiH8K3Y.js} +1 -1
- package/dist/assets/NotFoundScreen-CBOeKuhG.js +1 -0
- package/dist/assets/NotificationRoutes-Dhiufflf.js +1 -0
- package/dist/assets/OAuthConsentScreen-Ca-lx4xM.js +1 -0
- package/dist/assets/{PandLWithForecastRoutes-BsegyO1D.js → PandLWithForecastRoutes-aW5WT5CH.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-eNhR9FUM.js → PaymentLinkScreen-C2OZJlFd.js} +8 -8
- package/dist/assets/PeopleRoutes-B2NEnvyj.js +22 -0
- package/dist/assets/PerformanceRoutes-DphKMt6B.js +1 -0
- package/dist/assets/{Preview-slW2Ixf-.js → Preview-BeiBQxK-.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BYc3DqHZ.js → QBOConnectionScreen-O0kY1C3B.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DNX741Rs.js → ReimbursementApprovalRoutes-Dzvw2fZr.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-2ORMbxwr.js → ReimbursementApprovalRuleDetailScreen-BaxtZSL2.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BN8vNYWi.js → ReimbursementRoutes-DmbcBT5E.js} +9 -9
- package/dist/assets/ReportsRoutes-BQmYqXvS.js +1 -0
- package/dist/assets/RewardsRoutes-DvgOSJy0.js +1 -0
- package/dist/assets/ScreenRoutes-D76vOiPC.js +2 -0
- package/dist/assets/{SettingsRoutes-Cl1VWOb0.js → SettingsRoutes-DNrMSB0r.js} +6 -6
- package/dist/assets/{SetupPagesScreen-DAbhBEAF.js → SetupPagesScreen-28K-Ej_i.js} +5 -5
- package/dist/assets/SignInScreen-JKxT9Chm.js +1 -0
- package/dist/assets/SignOutScreen-DkhnXWYi.js +9 -0
- package/dist/assets/TaskListScreen-D13comxS.js +9 -0
- package/dist/assets/{TaskRoutes-BPceEuj1.js → TaskRoutes-BOftPZQw.js} +2 -2
- package/dist/assets/TransactionDetailRoutes-Br_-ul_i.js +1 -0
- package/dist/assets/{TransactionDetailScreen-CsnmL0BT.js → TransactionDetailScreen-B1_fDc_7.js} +2 -2
- package/dist/assets/TransactionListRoutes-DQwcR30R.js +1 -0
- package/dist/assets/TreasuryRoutes-Dnwm_7bw.js +37 -0
- package/dist/assets/VendorsRoutes-BCbNpFFW.js +112 -0
- package/dist/assets/WiseConfirmationScreen-mPs6_3sL.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-361LPKCn.js → ZeniAccountRoutes-CQnM-9GW.js} +7 -7
- package/dist/assets/ZeniAccountStatementScreen-CTIued6H.js +9 -0
- package/dist/assets/{accountMappingHelper-BgNXnMXC.js → accountMappingHelper-CJgy_TdU.js} +1 -1
- package/dist/assets/{analytics-Cuu7a7XR.js → analytics-drf9tsEq.js} +1 -1
- package/dist/assets/{analyticsHelper-CGHyb6cb.js → analyticsHelper-CDqT9wg1.js} +1 -1
- package/dist/assets/{core-D5xlmXJj.js → core-OUhaP0nM.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-N0xRs_hS.js → decodeURIComponentSafe-CoJI0rbl.js} +1 -1
- package/dist/assets/{dnd-DN-HQej8.js → dnd-XtKnRPbJ.js} +1 -1
- package/dist/assets/{empty-C81l0a_D.js → empty-CJaMNnL0.js} +1 -1
- package/dist/assets/{empty-O3WXjhlr.js → empty-DC6SKf2K.js} +1 -1
- package/dist/assets/{emptyVideoElement-DNB4w3eI.js → emptyVideoElement-b-LZRj6t.js} +1 -1
- package/dist/assets/{epic-BSdQyFUw.js → epic-Cg0CX13O.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-BchoKsfU.js → expenseAutomationHelper-DlI9q6Vn.js} +1 -1
- package/dist/assets/getLocaleForTenant-aTGgtilb.js +1 -0
- package/dist/assets/{index-BZhSlJBy.js → index-9ur6Fy2d.js} +1 -1
- package/dist/assets/{index-B4N0qOBD.js → index-B1OJLTM8.js} +2 -2
- package/dist/assets/{index-ChKsFe22.js → index-BEdQXZ7l.js} +1 -1
- package/dist/assets/{index-waurk8Yr.js → index-BjnriIg-.js} +11164 -11164
- package/dist/assets/{index-CcXiIb6r.js → index-DWbw7UWG.js} +1 -1
- package/dist/assets/{index-CojIsciJ.js → index-DkPv0SRW.js} +1 -1
- package/dist/assets/{index-B2tEu4AE.js → index-DmRkUvqd.js} +1 -1
- package/dist/assets/{index-L6DNygfO.js → index-Ic-s4E7h.js} +1 -1
- package/dist/assets/{lexical-DDQ51-Oa.js → lexical-cGeYDtsl.js} +1 -1
- package/dist/assets/{liveblocks-DOBkg1D1.js → liveblocks-QA8yK6T_.js} +1 -1
- package/dist/assets/{lottie-o0tP_TXQ.js → lottie-DaBLQBPb.js} +1 -1
- package/dist/assets/{mui-DpenkF9f.js → mui-BtZD__8k.js} +1 -1
- package/dist/assets/{pathToGoBack-Cjq5n9wd.js → pathToGoBack-C7Q0VFSf.js} +1 -1
- package/dist/assets/{pdf-DIMTd5ya.js → pdf-BMGNA2GO.js} +3 -3
- package/dist/assets/{pdf-lib-DU5YZRdD.js → pdf-lib-BukwiyrA.js} +1 -1
- package/dist/assets/{plaid-D5L6VoNT.js → plaid-Bbika4Gn.js} +1 -1
- package/dist/assets/{pusher-oX4CN6zb.js → pusher-9ZM5Kdsl.js} +1 -1
- package/dist/assets/{react-966-QmHM.js → react-B7VQZShg.js} +1 -1
- package/dist/assets/{react-Dq7Fy1Mm.js → react-BbnUu-8y.js} +1 -1
- package/dist/assets/{react-C-oQLK1P.js → react-Cvhq9zob.js} +1 -1
- package/dist/assets/{react-Cj8ClW-m.js → react-DyjJC6aa.js} +1 -1
- package/dist/assets/{react-nXpxox7I.js → react-SMF3sABx.js} +1 -1
- package/dist/assets/{react-a6JNjSit.js → react-_5p9PyE0.js} +1 -1
- package/dist/assets/{recharts-CcOTx_Jj.js → recharts-CnI5kYGO.js} +1 -1
- package/dist/assets/routePaths-Cz-sxWeK.js +1 -0
- package/dist/assets/{sentry-B0nIwgR6.js → sentry-DX8X0N2R.js} +1 -1
- package/dist/assets/{url-VkrE7aAr.js → url-DEE9M609.js} +1 -1
- package/dist/assets/{url-kBT6SwtU.js → url-DKOm_9Da.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CCxuDvI3.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-B4mPUD91.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-u2vXo3UU.js +1 -0
- package/dist/assets/{useDeviceId-ChTv1tr4.js → useDeviceId-Bunv1-ta.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-DRqxGzlR.js +1 -0
- package/dist/assets/useInitialThreadRequest-BR_6LodZ.js +1 -0
- package/dist/assets/{useTaskManagerAccess-Boniioo_.js → useTaskManagerAccess-3mEVnK_N.js} +1 -1
- package/dist/assets/{utils-DQ0YEP-f.js → utils-CHDSUF0P.js} +1 -1
- package/dist/assets/withTransactionSidePanel-DRyJqOb1.js +25 -0
- package/dist/assets/{zeni-epic-state-DVQQo6UD.js → zeni-epic-state-DzFY1eNZ.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AccountMappingScreen-B8Z5Jukp.js +0 -9
- package/dist/assets/AddressRoutes-AB7f2rQK.js +0 -1
- package/dist/assets/AiCfoScreen-bXnwas9y.js +0 -22
- package/dist/assets/AppDrawer-Bc0CsVN9.js +0 -10
- package/dist/assets/CustomerOnboardingAuthScreen-Cp-54_Na.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-CI14rSQG.js +0 -18
- package/dist/assets/DrawerScreen-D4sZ0x81.js +0 -1
- package/dist/assets/EntityDetailRoutes-iu3nvuUO.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-BcV9yLxC.js +0 -38
- package/dist/assets/FeaturePreviewScreen-BRYywZxe.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-fyIv5A_N.js +0 -1
- package/dist/assets/InvoicingRoutes-Dcjbiv_o.js +0 -2
- package/dist/assets/MagicLinkSignInScreen-D0umlmyl.js +0 -12
- package/dist/assets/NotFoundScreen-BZ7M6wRY.js +0 -1
- package/dist/assets/NotificationRoutes-P9DoW6gN.js +0 -1
- package/dist/assets/OAuthConsentScreen-BKn6Nxeb.js +0 -1
- package/dist/assets/PeopleRoutes-D6QzTTon.js +0 -22
- package/dist/assets/PerformanceRoutes-JzQ8nQOx.js +0 -1
- package/dist/assets/ReportsRoutes-Cq8Nmx-s.js +0 -1
- package/dist/assets/RewardsRoutes-D5AiHAwp.js +0 -1
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-BWl6soT-.js +0 -25
- package/dist/assets/ScreenRoutes-DcyDHL-V.js +0 -2
- package/dist/assets/SignInScreen-7BmIPffr.js +0 -1
- package/dist/assets/SignOutScreen-CkhaclxF.js +0 -9
- package/dist/assets/TaskListScreen-DBk5pNZk.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BL6LPgyb.js +0 -1
- package/dist/assets/TransactionListRoutes-DwAAMpvf.js +0 -1
- package/dist/assets/TreasuryRoutes-CW1AM8Em.js +0 -37
- package/dist/assets/VendorsRoutes-BkMbhAF5.js +0 -88
- package/dist/assets/WiseConfirmationScreen-BWYKTltN.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-DSVS1O6h.js +0 -9
- package/dist/assets/getLocaleForTenant-CyZtaI04.js +0 -1
- package/dist/assets/routePaths-D2W1iWQZ.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BrGfKrOJ.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-buoAy4Wo.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-29AHMbXs.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-a5BahjbB.js +0 -1
- package/dist/assets/useInitialThreadRequest-BmsCi-c4.js +0 -1
- package/dist/assets/withTransactionSidePanel-Bd8MYkO_.js +0 -25
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-DOBkg1D1.js";import{a as T}from"./sentry-B0nIwgR6.js";import{h as pa,u as fa,g as Ta,k as ga,j,i as _a,l as ma}from"./core-D5xlmXJj.js";import{aK as Da,aL as ba,z as x,O as Sa,y as G,as as ha,a8 as Ea,j as ya,S as Aa,e4 as Ca,p as R,a4 as Ga}from"./index-waurk8Yr.js";import{fB as Ia,a1e as X,Qm as B,a1f as Y,a1a as Ba,PK as M,a1g as Ka,PS as V,Ps as La,P4 as va,Qn as W,a1h as q,gd as wa,Qd as Ra,Qi as Ua,Q5 as Pa,Q3 as H,Qj as ja,Q0 as Fa,a1i as xa,a1j as Oa,a1k as $a,a1l as Na,a1m as I,dt as Qa,ds as za,a1n as Za,Pp as Ma}from"./zeni-epic-state-DVQQo6UD.js";import{n as Va}from"./mui-DpenkF9f.js";import{u as Wa}from"./useAskAiCfoHostNavButtonProps-buoAy4Wo.js";import{M as qa}from"./MobileAppDrawer-DCgsEnVh.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="85f65614-2af0-4300-8b06-086daf3d24d7",e._sentryDebugIdIdentifier="sentry-dbid-85f65614-2af0-4300-8b06-086daf3d24d7")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Ha=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Ja=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),U=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Xa=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const o={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(o.is_private=a.is_private),U(a.assignees)&&(o.assignees=a.assignees),U(a.direct_assignees)&&(o.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(o.created_by=a.created_by),U(a.task_group_ids)&&(o.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(o.name=a.name),typeof a.parent_task_id=="string"&&(o.parent_task_id=a.parent_task_id),o},Ya=e=>{if(e==null||typeof e!="object")return null;const a=e;return U(a.task_ids)?{task_ids:a.task_ids}:null},pe=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},ae=e=>{const{events:a,onEvent:n,onSubscribed:o}=e,i=Da(),g=T.useRef(n),l=T.useRef(o),_=T.useRef(0);T.useEffect((()=>{g.current=n}),[n]),T.useEffect((()=>{l.current=o}),[o]);const t=T.useMemo((()=>[...a].sort().join("|")),[a]);T.useEffect((()=>{if(i==null||a.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return a.forEach((m=>{const[D,b]=ba(m);if(b==="")return;const E=i.channel(D),y=f=>{g.current(b,f)};let k;if(E?.subscribed===!0){if(k=E,k.bind(b,y),!p.has(D)){p.add(D),S();const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{E.unbind(b,y)}))}else{if(k=E??i.subscribe(D),k.bind(b,y),!p.has(D)){p.add(D);const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{k.unbind(b,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},ee=Va.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,te=ma((function(e,a){const n=X(e,a.isTaskTemplatesEnabled),{taskGroupId:o}=a,i=o!=null&&o!==""?{...n,taskGroupsWithTasksList:n.taskGroupsWithTasksList.map((t=>({...t,tasks:t.tasks.filter((s=>s.taskGroupIds.includes(o)))}))).filter((t=>t.tasks.length>0))}:n,g=Ba(e),l=x.isZeniUser(),_=e.taskDetailState?.subTaskCreateStatus?.fetchState;return{taskListView:i,tagListView:g,localData:i.localData,isTaskTemplatesEnabled:a.isTaskTemplatesEnabled,isZeniUser:l,subTaskCreateStatus:_}}),(function(e,a){const{navigate:n,currentTenant:o,location:i,isTaskTemplatesEnabled:g}=a,{tenantEmailDomain:l}=o,{groupByKey:_}=a.uiState;return{onTaskManagementRowClick:t=>{const s=J(l,t),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{e(B(!0,g))},onTabChange:t=>{e(Na(t))},onParentTaskClick:t=>{const s=J(l,t);window.open(s,"_blank","noopener")},bulkUpdateTasks:(t,s)=>{e(H(t,null,s))},onNewTaskClick:()=>{if(a.localData.defaultTaskGroupId!=null){const t=F(l,a.localData.defaultTaskGroupId),s=R(i.state?.pathnameStackToGoBack,i.pathname);n(t,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(t,s)=>{e(q({uiState:{sortKey:t,sortOrder:s}}))},onFiltersChange:t=>{e($a({filters:t}))},onSearchTextChanged:t=>{e(Oa({searchText:t}))},onReloadCards:()=>{e(B(!0,g))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const t=Ga(i.state?.pathnameStackToGoBack),s=t.poppedPathname??"../";n(s,{state:{pathnameStackToGoBack:t.newStack}})}else n("../")},updateLocalData:t=>{e(xa({localData:t}))},resetLocalData:()=>{e(Y({taskGroupById:a.taskGroupState.taskGroupById}))},handleCreateGroup:t=>{e(Fa(a.localData.newTaskGroupName,t))},assignGroupToTasks:t=>{e(H(a.localData.selectedTaskIds,t,ja(a.uiState.groupByKey,t)))},onDeleteTaskGroup:t=>{e(Pa(t))},onAddNewTaskToTaskGroup:t=>{if(a.localData.defaultTaskGroupId!=null){const s=ne(_,t);e(M({taskDetailLocalData:s}));const p=F(l,a.uiState.groupByKey==="groupName"?t:a.localData.defaultTaskGroupId),S=R(i.state?.pathnameStackToGoBack,i.pathname);n(p,{state:{pathnameStackToGoBack:S,message:"comingFromTaskListPage"}})}},onDragNDrop:(t,s)=>{e(Ua(a.localData.selectedTaskIds.length>0?a.localData.selectedTaskIds:[t],s))},onTaskGroupRename:(t,s)=>{e(Ra(t,s))},onTimeSpentUpdate:(t,s)=>{e(W({task:t,updates:s}))},onShowToast:t=>{e(wa(t))},onGroupByFilterChange:t=>{e(q({uiState:{groupByKey:t}}))},updateTask:(t,s)=>{e(W({task:t,updates:s}))},onCreateTagClick:(t,s)=>{e(va(t,s))},onSubtaskCreation:(t,s)=>{e(La({...s,parentTaskId:t}))},handleGroupTemplateClick:t=>{e(V(t,[]))},handleGroupTemplateTaskClick:(t,s)=>{e(V(t,[s]))},handleNewTaskInitialization:t=>{if(e(M({taskDetailLocalData:{...Ka,name:t}})),a.localData.defaultTaskGroupId!=null){const s=F(l,a.localData.defaultTaskGroupId),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:t=>{n(`/${l}/tasks/group/${t}`)},onQuickResponsesClick:()=>{n(`/${l}/tasks/quick-responses`)}}}))(Ca);function se(){const e=pa(),a=fa(),n=Ta(),o=x.getSignedInUser(),i=x.isZeniUser(),g=ga(),l=j((u=>Ia(u))),{taskGroupId:_}=_a(),{useFeatureGate:t}=Sa(),{isFeatureEnabled:s}=t(G.isTaskTemplatesEnabled),{isFeatureEnabled:p}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:S}=t(G.isTaskCategorizationEnabled),{isFeatureEnabled:m}=t(G.isTaskBulkResolutionEnabled),{isFeatureEnabled:D}=t(G.isTaskGroupAssigneesEnabled),{isFeatureEnabled:b}=t(G.isTaskRecurringParentEnabled),[E,y]=T.useState(!1),k=j((u=>X(u,s))),f=j((u=>u.taskGroupState)),K=k.fetchState,{isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea}=Wa({mobileExploreReferrer:"Task Checklist"});ha({isDataReady:K==="Completed"}),T.useEffect((()=>{a(B(!1,s))}),[l?.tenantId,a,s]);const ta=T.useMemo((()=>{const u=[c.TASK_CREATED,c.TASK_UPDATED,c.TASKS_BULK_UPDATED,c.TASKS_BULK_DELETED],A=[c.TASK_CREATED,c.TASK_UPDATED,c.TASK_SNOOZE_RESURFACED,c.TASKS_BULK_UPDATED];return[...Ha(l?.companyId,u),...Ja(o?.userId,A)]}),[l?.companyId,o?.userId]);if(ae({events:ta,onEvent:(u,A)=>{switch(u){case c.TASK_CREATED:case c.TASK_UPDATED:{const r=Xa(A);if(r!=null){const w=g.getState(),O=r.task_id,h=O!=null?w.taskState.taskByID?.[O]:void 0,P=h!=null;if(!i)if(r.is_private===!0){if(!P)return}else{const L=o?.userId,v=new Set([...r.assignees??[],...r.direct_assignees??[]]);if(r.created_by!=null&&r.created_by!==""&&v.add(r.created_by),!(L!=null&&v.has(L))&&!P)return}if(u===c.TASK_UPDATED&&P&&h!=null&&Array.isArray(r.task_group_ids)){const L=new Set(Object.values(w.taskGroupState.taskGroupById??{}).filter((d=>d!=null&&!d.isDeleted)).map((d=>d.id))),v=(h.taskGroupIds??[]).filter((d=>L.has(d))),$=(r.task_group_ids??[]).filter((d=>L.has(d))),sa=v.length===$.length&&v.every((d=>$.includes(d))),N=h.taskGroupIds??[],Q=r.task_group_ids??[],na=N.length!==Q.length||!N.every((d=>Q.includes(d))),oa=(d,da)=>{const z=d??[],Z=da??[];if(z.length!==Z.length)return!1;const ca=new Set(Z);return z.every((ka=>ca.has(ka)))},ra=r.name==null||r.name===h.name,ia=r.is_private==null||r.is_private===h.isPrivate,la=r.assignees==null||oa(r.assignees,h.assignees),ua=r.direct_assignees==null;if(sa&&na&&ra&&ia&&la&&ua)return}}return void a(B(!0,s))}case c.TASKS_BULK_DELETED:{const r=Ya(A);return r==null?void 0:void r.task_ids.forEach((w=>a(Ma(w))))}case c.TASKS_BULK_UPDATED:case c.TASK_SNOOZE_RESURFACED:return void a(B(!0,s))}},onSubscribed:()=>{a(B(!0,s))}}),T.useEffect((()=>{K==="Completed"&&a(Y({taskGroupById:f.taskGroupById}))}),[K,f.taskGroupById]),o==null)throw Error("Can't access task list page without signing in...");return C.jsxs(C.Fragment,{children:[K==="Completed"?C.jsx(Ea,{analytics:ya,onLoad:u=>(A=>A.trackPageLoaded(Aa.Event.taskListPage))(u)}):null,C.jsxs(ee,{children:[C.jsx(qa,{isAppContentDrawerOpen:E,handleDrawerToggle:u=>{y(u)}}),C.jsx(te,{location:n,navigate:e,currentTenant:l,taskGroupId:_,taskGroupState:f,localData:k.localData,uiState:k.uiState,isTaskTemplatesEnabled:s,taskListFetchState:K,isTaskCategorizationEnabled:S,isTaskCannedResponsesEnabled:p,isTaskBulkResolutionEnabled:m,isTaskGroupAssigneesEnabled:D,isTaskRecurringParentEnabled:b,isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea})]})]})}const J=(e,a)=>`/${e}/tasks/${encodeURIComponent(a)}`,F=(e,a)=>`/${e}/tasks/new/${a}`,ne=(e,a)=>{if(e==="assignee"){const n=a.split(",");return{...I.taskDetailLocalData,assignee:n}}if(e==="priority"){const n=Qa(a);return{...I.taskDetailLocalData,priority:n}}if(e==="status"){const n=za(a);return{...I.taskDetailLocalData,status:n}}if(e==="tag"){const n=a.split(",");return{...I.taskDetailLocalData,tagIds:n}}if(e==="dueDate"){const n=Za(a);return{...I.taskDetailLocalData,dueDate:n}}return{...I.taskDetailLocalData}},fe=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"}));export{c as T,Ja as a,Ha as b,Ya as c,Xa as d,se as e,fe as f,pe as t,ae as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-DOBkg1D1.js";import i from"./NotFoundScreen-BZ7M6wRY.js";import{T as r}from"./TransactionDetailScreen-CsnmL0BT.js";import"./sentry-B0nIwgR6.js";import{n as d,o}from"./core-D5xlmXJj.js";import"./zeni-epic-state-DVQQo6UD.js";import"./recharts-CcOTx_Jj.js";import"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.js";import"./useAskAiCfoHostNavButtonProps-buoAy4Wo.js";import"./decodeURIComponentSafe-N0xRs_hS.js";import"./useInitialThreadRequest-BmsCi-c4.js";import"./routePaths-D2W1iWQZ.js";import"./expenseAutomationHelper-BchoKsfU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="07c2895c-270d-414b-a4ec-49ceb0cdd05a",e._sentryDebugIdIdentifier="sentry-dbid-07c2895c-270d-414b-a4ec-49ceb0cdd05a")}catch{}})();function z(){return t.jsxs(d,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DOBkg1D1.js";import{h as X,g as U,u as K,i as Q,j as g,N as q,l as H,n as Me,o as C}from"./core-D5xlmXJj.js";import{fB as Z,tx as ee,lb as p,et as te,Rk as Se,br as pe,_Y as Be,lX as ae,Vt as ne,_Z as fe,__ as Le,bE as k,Rg as he,_$ as Fe,$0 as Te,$1 as Oe,Rj as ge,$2 as Ge,$3 as De,$4 as $e,$5 as Ie,$6 as we,$7 as ze,$8 as ye,Sw as Re}from"./zeni-epic-state-DVQQo6UD.js";import{O as ce,y as J,j as F,G as ke,dc as oe,p as z,a4 as se,aq as _e,W as Ve}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import{a as y}from"./sentry-B0nIwgR6.js";import{w as ie}from"./withTransactionSidePanel-Bd8MYkO_.js";import{p as re,c as de}from"./routePaths-D2W1iWQZ.js";import{w as Ne}from"./utils-DQ0YEP-f.js";import{d as j}from"./decodeURIComponentSafe-N0xRs_hS.js";import{Z as Je}from"./ZeniAccountStatementScreen-DSVS1O6h.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./useAskAiCfoHostNavButtonProps-buoAy4Wo.js";import"./TransactionDetailScreen-CsnmL0BT.js";import"./useInitialThreadRequest-BmsCi-c4.js";import"./expenseAutomationHelper-BchoKsfU.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="837ed086-9787-4ee3-9504-dc00291af29f",a._sentryDebugIdIdentifier="sentry-dbid-837ed086-9787-4ee3-9504-dc00291af29f")}catch{}})();const Ue=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>Ne(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},qe=H((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=N(e.selectedAccount.tranListType),d=Xe(t,n,c,o,e.bookCloseDate);F.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:N(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=X(),t=U(),n=K(),c=t.pathname.split("/").find((l=>Ue.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=Q(),{accountType:Y,title:v,subTitle:A}=Ze(o),f="month",T=g((l=>Z(l))),b=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(J.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:O}=We(o,b,T.bookCloseDate),[P,G]=y.useState(!1),[E,$]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:v,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){G(!0),F.trackTransactionList(void 0,void 0,void 0,u.title);const l=N(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(q,{to:"../"}):s.jsx(qe,{firstMonthOfFY:b,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>$(l),...a})})),Ze=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=pe();let c=pe().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Xe=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ke=H((function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Qe=ie((function({referrerType:a,...e}){const t=X(),n=U(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:v,timeframe:A,startDate:f,endDate:T,titleEncoded:b}=Q(),S=j(d??""),h=j(Y??""),I=j(v??""),x=j(b??""),O=g((r=>Le(r.transactionListState,h,S,I))),[P,G]=y.useState(!1),[E,$]=y.useState(void 0),u=g((r=>Z(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),w=g((r=>ee(r)))&&m;let i;const L=He(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=et(O?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||(G(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,v,A,f,T,b].filter((r=>r!=null));return L&&B!=null?s.jsx(Ke,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>$(r),...e}):s.jsx(q,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=H((function(a,e){const t=Ge(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=X(),n=U(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:v,timeframe:A,startDate:f,endDate:T,titleEncoded:b}=Q(),S=j(d??""),h=j(Y??""),I=j(v??""),x=j(b??""),O=g((r=>Oe(r.transactionListState,h,S,I))),[P,G]=y.useState(!1),[E,$]=y.useState(void 0),u=g((r=>Z(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),w=g((r=>ee(r)))&&m;let i;const L=nt(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=ct(O?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||(G(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,v,A,f,T,b].filter((r=>r!=null));return L&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>$(r),...e}):s.jsx(q,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=H((function(a,e){const t=we(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ze(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=X(),n=U(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:v,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:b}=Q(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(b!=null&&b==="exclude_subaccounts"),O=g((D=>$e(D.transactionListState,h,S))),[P,G]=y.useState(!1),[E,$]=y.useState(void 0),u=g((D=>Z(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const w=st(S,h,v,A,f,I);if(w){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:v,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:L}=ce(),{isFeatureEnabled:B}=L(J.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),W=new URLSearchParams(xe??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const Ce=z(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${W.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=L(J.isProjectsTransactionsEnabled),_=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=_e();y.useEffect((()=>{!P&&m!=null&&ue&&(G(!0),F.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,v,A,f,T].filter((D=>D!=null));return w&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:_,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>$(D),...e}):s.jsx(q,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Mt(){const a=U().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>Z(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Je,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(q,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Mt as default};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-DOBkg1D1.js";import{h as L,g as F,u as U,i as V,j as y,N as D,l as O,n as Te,o as k}from"./core-D5xlmXJj.js";import{cu as M,fB as v,Yv as B,NK as ae,Nr as q,Ns as ne,Yx as we,NN as Ie,Yt as Ce,Yu as se,YJ as ke,LO as je,Bv as be,Yz as Ae,NU as Ee,Yw as re,d9 as Z,F$ as oe,dU as ve,dV as De,_V as Le,_W as Fe,Nt as Ue,_X as Be,Nu as Pe,ND as Re,bq as Ne,bJ as Ve,cF as Oe,bK as Me,ct as _e,bt as ze,Tw as $e,cs as Ge}from"./zeni-epic-state-DVQQo6UD.js";import{V as _,h as Ye,z as E,a8 as z,j as b,d5 as qe,d6 as Ze,d7 as Y,a1 as H,E as He,aq as Ke,as as We,O as ie,y as R,ab as Je,a7 as Xe,d8 as Qe,ae as K,p as et,d9 as tt,a4 as W,da as at,ai as nt,$ as X,db as st,f as rt}from"./index-waurk8Yr.js";import{D as ot,n as N,S as it}from"./mui-DpenkF9f.js";import ct from"./NotFoundScreen-BZ7M6wRY.js";import{S as Q}from"./SetupPagesScreen-DAbhBEAF.js";import{a as p}from"./sentry-B0nIwgR6.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-buoAy4Wo.js";import{u as ut}from"./useInitialThreadRequest-BmsCi-c4.js";import{M as ce}from"./MobileAppDrawer-DCgsEnVh.js";import{F as dt}from"./FeaturePreviewScreen-BRYywZxe.js";import{a as ee}from"./analyticsHelper-CGHyb6cb.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.js";import"./BusinessVerificationPageScreen-Boe3kgD5.js";import"./routePaths-D2W1iWQZ.js";import"./InboxNotificationsProvider-B9BL9-5c.js";import"./useTaskManagerAccess-Boniioo_.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="c8fff9f9-b82f-4046-9ba5-486fb33943dd",t._sentryDebugIdIdentifier="sentry-dbid-c8fff9f9-b82f-4046-9ba5-486fb33943dd")}catch{}})();const pt=O((function(t,a){const{companyId:n}=a;return{treasurySetupView:B(t,n),analytics:b}}),(function(t,a){const{navigate:n,analytics:o,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=i.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}}))(qe);function mt(){const t=L(),a=F(),n=U(),{tenantEmailDomain:o}=V(),i=_(),r=y((I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=Ye(r),s=M(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,T]=p.useState(!1),[l,u]=p.useState(!1),x=y((I=>v(I))),f=E.getSignedInUserTenant(o)?.companyId??x.companyId,C=E.getSignedInUser(),h=y((I=>B(I,f))),g=y((I=>I.treasurySetupViewState.fetchState)),j=y((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),w=y((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||w!=="Not-Started"||f==null||(u(!0),n(q()))}),[l,w,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(T(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&r==="Completed"&&t("../")}),[m,r,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:P,isReadOnly:!s,treasurySetupView:h,analytics:b})]})}const ft=O((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:B(t,n)}}),(function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:i}=a,r=o.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{Y(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Y(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(Ze),yt=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:o}=V(),i=U(),[r,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[T,l]=p.useState(!1),u=y((w=>w.treasurySetupViewState.fetchState)),x=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((w=>v(w))),h=E.getSignedInUserTenant(o)?.companyId??C.companyId,g=y((w=>Ce(w))),j=y((w=>B(w,h)));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(q()))}),[c,x,h,i]),p.useEffect((()=>{T||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[T,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ft,{analytics:b,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:r,maxInsuredAmount:5e5,onReviewClick:()=>{Y(b,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},gt=N.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,St={overlayWidth:new Je(100,100,48)},ht=O((function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:B(t,o),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:o,location:i,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:d=>{let c="page-not-found";d==="editPortfolio"?c=xt(s):d==="statements"?c=Tt(s):d==="taxLetter"?c=wt(s):d==="settings"&&(c=It(s));const S=et(i.state?.pathnameStackToGoBack,i.pathname);n(c,{state:{pathnameStackToGoBack:S}})},onColumnSortConfigChanged:(d,c)=>{t(Le({uiState:{sortKey:d,sortOrder:c}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}}))(Qe);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=F(),o=L(),i=U(),r=H(),m=He(),s=y((A=>v(A))),{tenantEmailDomain:d}=V(),c=s.companyId??E.getSignedInUserTenant(d)?.companyId,[S,T]=p.useState(!1),l=y((A=>re(A))),u=l.fetchState,x=l.accountSummary?.totalBalance?.amount,f=y((A=>A.treasurySetupViewState.treasuryFundsDetails?.fetchStatus)),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=_(),g=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,j=M(h?.loggedInUserRoleMap),w=Z(h?.loggedInUserRoleMap),{areTenantIdsInSync:P}=Ke();p.useEffect((()=>{u==="Not-Started"&&!S&&P&&(T(!0),i(oe(!0)))}),[S,i,u,P]),p.useEffect((()=>{l.transactionsFetchState.fetchState==="Completed"&&l.transactions.length===0&&!n.pathname.includes("transfer")&&j&&o("./transfer")}),[l.transactionsFetchState.fetchState,l.transactions.length,n.pathname,j,o]);const I=()=>{o("..")},[le,ue]=p.useState(!1),J=A=>{ue(A)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});We({isDataReady:u==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:me}=$(R.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=$(R.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=$(R.isTreasuryCommentingEnabled),ge=ut(c,{clearParams:u==="Completed"&&f?.fetchState==="Completed"}),Se=ve(s),he=De(me,s);if(Se===!0&&he!==!0)return e.jsx(dt,{});if(C){const A=f?.fetchState!=="Completed"||l.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[l.accountSummaryFetchState.fetchState==="Completed"&&f?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(ot,{onClose:I,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:l.transactions.length===0||x===0,isTransactionsLoaded:l.transactionsFetchState.fetchState!=="In-Progress"&&l.transactionsFetchState.fetchState!=="Not-Started"}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:J}),e.jsx(ht,{treasuryDetailsView:l,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:c,analytics:b,isTreasuryCommentingEnabled:ye,handleDrawerToggle:J,initialOpenThreadRequest:ge,isLoading:A,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return g&&j?e.jsx(D,{to:"../setup"}):s.companyTreasuryInfo?.info&&!g&&w?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(Xe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,It=t=>`/${t}/treasury/setup`,Ct=N(it)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,kt=N.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
height: 100vh;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function jt(){const t=L(),a=U(),n=H(),o=F(),i=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=p.useState(!1),s=y((u=>Fe(u)));p.useEffect((()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))}),[r,s.fetchState,a]);const d=E.getSignedInUser(),c=y((u=>v(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},T=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access statements page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(tt,{currentTenantCompanyName:T,statementListView:s,isLoading:l,onBackClick:()=>{const u=W(o.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const bt=N.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function At(){const t=L(),a=H(),n=F(),o=U(),i=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=p.useState(!1),s=y((u=>Be(u)));p.useEffect((()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))}),[r,s.fetchState,o]);const d=E.getSignedInUser(),c=y((u=>v(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},T=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access tax letter page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(at,{currentTenantCompanyName:T,taxLetterListView:s,isLoading:l,onBackClick:()=>{const u=W(n.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const Et=O((function(t,a){const{companyId:n}=a,o=B(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),(function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:i=>{n(i?"..":"../setup",{relative:"path"})}}}))(st),vt=()=>{const t=nt(),a=L(),n=F(),o=U(),{tenantEmailDomain:i}=V(),[r,m]=p.useState(!1),s=y((g=>v(g))),[d,c]=p.useState(!1),S=y((g=>g.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{d||S?.fetchState!=="Not-Started"||T==null||(c(!0),o(q()))}),[S,o]);const T=E.getSignedInUserTenant(i)?.companyId??s.companyId,l=E.getSignedInUser(),u=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=g=>{m(g)};if(l==null)throw Error("Can't access treasury promo page without signing in...");const f=_(),C=M(f?.loggedInUserRoleMap),h=Z(f?.loggedInUserRoleMap);if(u&&C)return e.jsx(D,{to:"../../treasury/setup"});if(s.company?.companyTreasuryInfo&&(!u&&C||h)){if(n.state?.message==="activation"){const g=W(n.state?.pathnameStackToGoBack);a(n.pathname,{state:{...n.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return S?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:g=>(j=>j.trackTreasuryPromoView("Treasury Promo Page"))(g)}),e.jsx(ce,{isAppContentDrawerOpen:r,handleDrawerToggle:x}),e.jsx(Et,{analytics:b,navigate:a,companyId:T,meetingUrl:t("treasury_promo"),onClickMenuIcon:()=>{x(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=N.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
align-items: center;
|
|
36
|
-
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function aa(){const t=F(),a=y((g=>v(g))),{useFeatureGate:n}=ie(),o=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",i=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Ne(a?.userRole),d=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),c=Oe(r?.loggedInUserRoleMap),S=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),T=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!s&&_e(r?.loggedInUserRoleMap),l=o&&!s&&M(r?.loggedInUserRoleMap),{isFeatureEnabled:u}=n(R.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=n(R.isDebitCardFeatureEnabled),f=rt(a,u,x)&&!s&&ze(r?.loggedInUserRoleMap),C=$e(r?.loggedInUserRoleMap),h=Ge(r?.loggedInUserRoleMap);return e.jsxs(Te,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:T,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:c,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isUserHasOnlyBillPayAccess:c,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:T,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),o?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),l?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):i&&l?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{aa as default};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-DOBkg1D1.js";import{a as u}from"./sentry-B0nIwgR6.js";import{h as N,u as $,i as Y,j as f,l as G,g as H,n as Me,o as k,N as B}from"./core-D5xlmXJj.js";import{U_ as gt,U$ as Ze,QO as et,V0 as vt,fB as U,gX as ge,V1 as Tt,cD as xt,V2 as bt,EX as yt,V3 as wt,V4 as oe,V5 as te,V6 as ve,Sn as ue,So as Fe,Fb as pe,Sm as he,E_ as tt,Ex as ke,V7 as It,Sp as J,lX as me,V8 as Pe,Er as Ct,V9 as Dt,Va as Vt,Vb as je,Vc as _e,Vd as Ae,Ve as Re,F5 as Te,Vf as nt,EO as at,Vg as Et,Vh as Ft,Vi as kt,Vj as Pt,Vk as jt,Vl as _t,Vm as At,Vn as Rt,BH as Ut,BP as Bt,BI as Lt,Ru as we,Vo as Ot,Vp as Mt,lb as Ie,br as Nt,Vq as Gt,Vr as $t,mV as zt,n2 as Yt,Rt as Ce,bE as Ne,Vs as ot,R4 as st,Vt as Jt,Vu as qt,Vv as Kt,n4 as Ht,Vw as Ge,Vx as $e,Vy as ze,Vz as Ye,VA as Qt,n0 as Wt,VB as Xt,n3 as Zt,VC as en,VD as it,RP as rt,mj as tn,VE as nn,VF as De,VG as dt,RN as lt,Hw as an,VH as on,VI as sn,mD as ct,VJ as rn,VK as dn,R$ as ln,uD as cn,VL as ut,VM as Je,RY as Ve,VN as qe,VO as un,S1 as pn,VP as hn,VQ as mn,VR as fn,VS as Sn,VT as gn,uG as vn,VU as Tn,Sq as xn,TZ as bn,RG as Ee,i7 as yn,T$ as wn,T_ as In,i5 as Cn,VV as Dn,VW as Vn,HB as En,VX as Fn,VY as kn,VZ as Pn,V_ as jn,mn as _n,bn as An,dV as Rn,dU as Un}from"./zeni-epic-state-DVQQo6UD.js";import{E as Bn,a1 as ne,ab as Ue,O as Q,y as M,z as R,a7 as Ln,aM as On,j as P,Y as Be,_ as xe,av as ee,as as se,aN as Mn,aO as pt,aq as Nn,a8 as Se,aP as Gn,p as K,V as $n,G as ht,aQ as zn,ae as mt,a4 as Yn,h as Ke,aR as Jn,J as q,a9 as qn,af as ft,ag as Kn,aS as Hn,aT as Qn,S as Le,aU as Wn,aV as Xn,a3 as Zn,aW as ea,aX as ta}from"./index-waurk8Yr.js";import{D as na,n as L,S as St}from"./mui-DpenkF9f.js";import{t as aa,A as oa}from"./AddressScreen-pJKlDi3q.js";import fe from"./NotFoundScreen-BZ7M6wRY.js";import{F as sa}from"./FeaturePreviewScreen-BRYywZxe.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-BWl6soT-.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-buoAy4Wo.js";import{M as re}from"./MobileAppDrawer-DCgsEnVh.js";import{v as Oe,c as ua,d as pa}from"./routePaths-D2W1iWQZ.js";import{D as ha}from"./DrawerScreen-D4sZ0x81.js";import{a as ma,m as fa}from"./accountMappingHelper-BgNXnMXC.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.js";import"./pathToGoBack-Cjq5n9wd.js";import"./InboxNotificationsProvider-B9BL9-5c.js";import"./useTaskManagerAccess-Boniioo_.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="0a332ed8-0226-470d-8eed-0390709f7979",e._sentryDebugIdIdentifier="sentry-dbid-0a332ed8-0226-470d-8eed-0390709f7979")}catch{}})();const Sa={drawerLeftMargin:new Ue(0,0,100,200)},ga=G((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=U(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:P,qboAppUrl:xt(Be.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(On),va=()=>{const e=Bn(),a=N(),s=$(),{scheduleDetailId:t}=Y(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=Y(),{useFeatureGate:p}=Q(),{isFeatureEnabled:h}=p(M.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>U(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Ln,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=L(St)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,de=e=>{switch(e){case"vendors_tab":return"../summary";case"filing_1099":return"../filing_1099";case"prepaid_expenses":return"../schedules/prepaid_expenses";case"fixed_assets":return"../schedules/fixed_assets";case"accrued_expenses":return"../schedules/accrued_expenses";default:return"../opex"}},le=e=>{switch(e){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"operating_expenses_by_vendor":return"operating_expenses";default:return"vendors_list"}},ce=()=>{const e=H(),a=$(),s=f((t=>oe(t)));return u.useEffect((()=>{const t=e.pathname.split("/").pop();if(t!=null){const n=(i=>{switch(i){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"opex":return"operating_expenses";case"filing_1099":return"filing_1099";default:return"vendors_list"}})(t);n!==s.currentTab&&a(te(n))}}),[e.pathname,s.currentTab,a]),s},W="accrued_expenses",xa=G((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:W,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:W,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:W,searchText:t}))},onReloadReport:()=>{e(tt(W))},onScroll:t=>{e(je({scheduleType:W,scrollYOffset:t}))},onClickNewButton:()=>{e(Dt()),e(Vt()),P.trackScheduleAccruedDetailsNewRequested({scheduleType:"accrued_expenses"}),s("details/new")},onClickSchedule:t=>{e(Ct({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeAccruedSchedules.find((i=>i.jeAccruedScheduleKey===t));s(`details/${n?.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(Pe({scheduleType:W,fetchState:t}))}}}))(Mn),ba=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),[i,l]=u.useState(!1),p=N(),h=$(),{useFeatureGate:v}=Q(),m=xe();ce();const{isFeatureEnabled:r,isFeatureGateLoading:d}=v(M.isOpexByVendorFeatureEnabled),c=R.getSignedInUser(),T=f((S=>U(S))),x={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:T.tenantId},g=u.useMemo((()=>({authParams:x,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:T.companyName})),[]),[y,b]=u.useState(!1),I=f((S=>ue(S))),V=f((S=>Fe(S,"accrued_expenses"))),C=e.includes("prepaid_expenses"),w=e.includes("fixed_assets"),A=e.includes("accrued_expenses");u.useEffect((()=>{(C||w||A)&&y===!1&&I!=="Completed"&&(h(pe()),b(!0))}),[y]),u.useEffect((()=>{d===!1&&(h(he({shouldFetchAccruedExpenses:A,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:C,shouldFetchOpexByVendor:r,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[I,w,d,r]),u.useEffect((()=>{t===!1&&V==="Completed"&&h(tt("accrued_expenses",{selectedTimeframe:ke("accrued_expenses"),selectedCategoryId:"all"},!0))}),[t,V]);const j=f((S=>It(S,W))),{isAiCfoAccessEnabled:O,onAskAiCfoClick:E}=ie({mobileExploreReferrer:"Vendors — Accrued Expenses"});se({isDataReady:j.fetchState==="Completed"});const D=f((S=>J(S).isReportGenerated));f((S=>J(S).fetchState))!=="Completed"||D!==!0||r!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),A||p("../opex");const F=f((S=>ge(S,T.companyId))),z=S=>{l(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:i,handleDrawerToggle:z}),o.jsx(xa,{navigate:p,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:j,downloadParams:g,themeState:m,vendorTabsToShow:e,analytics:P,controllerUserDetails:F,isAiCfoAccessEnabled:O,onAskAiCfoClick:E,onClickMenuIcon:()=>z(!0)})]})},X="fixed_assets",ya=G((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:X,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:X,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:X,searchText:t}))},onReloadReport:()=>{e(Te(X))},onScroll:t=>{e(je({scheduleType:X,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(Pe({scheduleType:X,fetchState:t}))}}}))(pt),wa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=N(),l=$();ce();const{useFeatureGate:p}=Q(),h=xe(),{isFeatureEnabled:v,isFeatureGateLoading:m}=p(M.isOpexByVendorFeatureEnabled),r=R.getSignedInUser(),d=f((S=>U(S))),c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d.tenantId},T=u.useMemo((()=>({authParams:c,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[x,g]=u.useState(!1),y=f((S=>ue(S))),b=f((S=>Fe(S,"fixed_assets"))),I=e.includes("prepaid_expenses"),V=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||V||C)&&x===!1&&y!=="Completed"&&(l(pe()),g(!0))}),[x]),u.useEffect((()=>{m===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:I,shouldFetchOpexByVendor:v,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[y,V,m,v]),u.useEffect((()=>{t===!1&&b==="Completed"&&l(Te("fixed_assets",{selectedTimeframe:ke("fixed_assets"),selectedCategoryId:"all"},!0))}),[t,b]);const w=f((S=>nt(S,X))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:j}=ie({mobileExploreReferrer:"Vendors — Fixed Assets"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>J(S).isReportGenerated));f((S=>J(S).fetchState))!=="Completed"||O!==!0||v!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),V||i("../opex");const E=f((S=>ge(S,d.companyId))),[D,F]=u.useState(!1),z=S=>{F(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:z}),o.jsx(ya,{navigate:i,scheduleListReport:w,downloadParams:T,previousTabPosition:a,setPreviousTabPosition:s,themeState:h,vendorTabsToShow:e,analytics:P,controllerUserDetails:E,isAiCfoAccessEnabled:A,onAskAiCfoClick:j,onClickMenuIcon:()=>{z(!0)}})]})},Ia=L.div`
|
|
6
|
-
display: flex;
|
|
7
|
-
min-height: 100%;
|
|
8
|
-
width: 100%;
|
|
9
|
-
flex: 1 1 auto;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
13
|
-
`,Ca=G((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=U(e),i=n?.companyName??"",l={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},p=J(e),h=Et(e);return{report:p,uiState:h,isAccountingClassesEnabled:me(e),analytics:P,vendorTabsToShow:a.vendorTabsToShow,downloadParams:{downloadState:h.downloadState,currentTenantCompanyName:i,statementEndPoint:`${ee}/opexByVendor`,authParams:l,timezone:ve()}}}),(function(e,a){const{navigate:s}=a;return{onFetchOpExByVendors:(t,n,i)=>{e(Lt(t,n,i))},onVendorNameAndBalanceClicked:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t.id,t.qboId,a.tenantEmailDomain,n),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses By Vendor"}})}},onRefresh:()=>{e(Bt())},onReloadReport:()=>{e(Ut(!0))},onBackClick:()=>{s("../../dashboard")},onTimeframeSelectionChanged:t=>{e(Rt(t))},onAdditionalBalanceSelectionChanged:(t,n)=>{e(At({isCompareModeOn:t,additionalBalances:n}))},onSortOrderChanged:(t,n,i)=>{e(_t({sortkey:n,sortOrder:t,timeframe:i}))},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrSearchStarted:t=>{e(jt(t))},onPageFetchStarted:()=>{e(Pt(!0))},updateDownloadStateHandler:t=>{e(kt(t))},onClearSearch:t=>{e(Ft({timeframe:t}))}}}))(Gn);function Da({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=$(),i=H(),{tenantEmailDomain:l}=Y(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=Q(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled),d=f((E=>J(E)));if(h==null)throw Error("Can't access opex by vendor page without signing in...");ce();const[c,T]=u.useState(!1),x=f((E=>ue(E))),g=e.includes("prepaid_expenses"),y=e.includes("fixed_assets"),b=e.includes("accrued_expenses"),I=f((E=>oe(E))),{isAiCfoAccessEnabled:V,onAskAiCfoClick:C}=ie({mobileExploreReferrer:"Vendors — Operating Expenses by Vendor"});se({isDataReady:d.fetchState==="Completed"&&d.isReportGenerated===!0});const{areTenantIdsInSync:w}=Nn();u.useEffect((()=>{(g||y||b)&&c===!1&&x!=="Completed"&&w&&(n(pe()),T(!0))}),[c,w]),u.useEffect((()=>{w&&n(he({shouldFetchAccruedExpenses:b,shouldFetchFixedAssets:y,shouldFetchPrepaidExpenses:g,shouldFetchOpexByVendor:m===!0&&r===!1,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1}))}),[x,y,r,m,w]),d.fetchState!=="Completed"||d.isReportGenerated!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),u.useEffect((()=>{w&&(d.isReportGenerated===!1&&d.fetchState==="Completed"||m===!1&&r===!1)&&t("../summary")}),[w,d.isReportGenerated,d.fetchState,m,r,t]);const[A,j]=u.useState(!1),O=E=>{j(E)};return o.jsxs(Ia,{windowSize:p,children:[d.fetchState==="Completed"?o.jsx(Se,{analytics:P,onLoad:E=>{I.previousTab==null?E.trackVendorOperatingExpensesPageLoaded("Side Panel"):E.trackVendorOperatingExpenses(I.currentTab,I.previousTab??null)}}):null,o.jsx(re,{isAppContentDrawerOpen:A,handleDrawerToggle:O}),o.jsx(Ca,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:V,onAskAiCfoClick:C,onClickMenuIcon:()=>{O(!0)}})]})}const Z="prepaid_expenses",Va=G((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Z,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Z,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:Z,searchText:t}))},onReloadReport:()=>{e(Te(Z))},onScroll:t=>{e(je({scheduleType:Z,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(Pe({scheduleType:Z,fetchState:t}))}}}))(pt),Ea=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=N(),l=$(),{useFeatureGate:p}=Q(),h=xe();ce();const v=R.getSignedInUser(),{isFeatureEnabled:m,isFeatureGateLoading:r}=p(M.isOpexByVendorFeatureEnabled),d=f((S=>U(S))),c=f((S=>Fe(S,"prepaid_expenses"))),T={userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:d.tenantId},x=u.useMemo((()=>({authParams:T,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[g,y]=u.useState(!1),b=f((S=>ue(S))),I=e.includes("prepaid_expenses"),V=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||V||C)&&g===!1&&b!=="Completed"&&(l(pe()),y(!0))}),[g]),u.useEffect((()=>{t===!1&&c==="Completed"&&l(Te("prepaid_expenses",{selectedTimeframe:ke("prepaid_expenses"),selectedCategoryId:"all"},!0))}),[t,c]),u.useEffect((()=>{r===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:V,shouldFetchPrepaidExpenses:!0,shouldFetchOpexByVendor:m,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[b,V,r,m]);const w=f((S=>nt(S,Z))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:j}=ie({mobileExploreReferrer:"Vendors — Prepaid Expenses"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>J(S).isReportGenerated));f((S=>J(S).fetchState))!=="Completed"||O!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),I||i("../opex");const E=f((S=>ge(S,d.companyId))),[D,F]=u.useState(!1),z=S=>{F(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:z}),o.jsx(Va,{navigate:i,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:w,downloadParams:x,themeState:h,vendorTabsToShow:e,analytics:P,controllerUserDetails:E,isAiCfoAccessEnabled:A,onAskAiCfoClick:j,onClickMenuIcon:()=>{z(!0)}})]})},Fa=L.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
min-height: 100%;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
21
|
-
`,ka=G((function(e,a){const{isFiling1099FeatureEnabled:s,vendorDetailView:t,selectedVendor:n,firstMonthOfFY:i,currentTenant:l,currentUserRoleMap:p}=a,h=R.getSignedInUser(),v={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:l.tenantId??""};return{firstMonthOfFY:i,isFiling1099FeatureEnabled:s,vendorDetailView:t,allTransactions:t?.allVendorTransactionsView,allTransactionsTabData:t?.allTransactionsTabData!=null?{timePeriod:Jt(t?.allTransactionsTabData.timePeriod),numberOfQuartersFetched:t?.allTransactionsTabData.numberOfQuartersFetched}:void 0,vendorLogo:n?.logo,readOnlyMode:p?.bookkeeping_user===!0,filesEndPoint:mt.fileMicroServiceBaseUrl,authParams:v,scrollToTrend:a.isTrendPeriodSelected}}),(function(e,a){const{navigate:s,vendorDetailView:t,vendorId:n,defaultTransactionTimePeriod:i,vendorEntity:l,tenantEmailDomain:p,location:h,firstMonthOfFY:v}=a,m=()=>{const r=Yn(h.state?.pathnameStackToGoBack),d=r.poppedPathname??((c=2)=>{let T=c;a.isTrendPeriodSelected===!0&&(T=5);let x="../";for(let g=0;g<T;g++)x=`${x}../`;return x})(1);s(d,{state:{pathnameStackToGoBack:r.newStack}})};return{onSaveVendor:()=>{t!=null&&((r,d)=>{const{vendorId:c,vendorName:T,existingCategory:x,existingClass:g,existingOwner:y,selectedCategory:b,selectedClass:I,selectedOwner:V,isRecommendedCategorySelected:C,isRecommendedClassSelected:w,categoryRecommendationTypeSelected:A,classRecommendationTypeSelected:j}=en(r,d);c!=null&&P.trackVendorDetailsSave(c,T??"",x,g,y,b,I,V,C,w,A,j)})(t?.vendorViewDetails,t?.vendorViewDetails.ownerList),n!=null&&e(Zt(n,void 0))},onVendorSpendTrendFilterTabClick:r=>{e(Xt(r))},saveVendorDetailLocalData:r=>{n!=null&&e(Wt({vendorId:n,localData:r}))},saveContactsInVendorTabDetailLocalData:(r,d)=>{e(Qt({vendorId:r,localData:{contacts:d}}))},onCancelClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView.vendorBasic).id!=null&&P.trackVendorDetailsCancel(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email),e(Ge()),e($e()),e(ze()),e(Ye()),m()},handleSpendTrendPercentChangeClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView?.vendorBasic,r.id!=null&&P.trackVendorDetailsSpendTrendHotlinkClicked(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email))},onSaveSuccess:()=>{n!=null&&e(Ht("Not-Started",n)),e(Ge()),e($e()),e(ze()),e(Ye()),m()},onTrendSelectedPeriodChange:r=>{if(r==null)i!=null&&e(we(l,"EntityDetail",{timeframe:"quarter",timePeriod:i}));else{const d=r.currentTimePeriod==null?r.addTimePeriod:{startDate:r.addTimePeriod.startDate,endDate:r.currentTimePeriod.endDate};e(Ce(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:r.addTimePeriod},v)),e(we(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:d}))}},onVendorTabSelectionChanged:r=>{e(Kt(r))},onAddressClick:(r,d)=>{if(p==null)return;const c=pa(p,r,d),T=K(h.state?.pathnameStackToGoBack,h.pathname);s(c,{state:{pathnameStackToGoBack:T}})},onVendorDetailUIChange:r=>{e(qt({collapsableStatus:r}))},onTransactionItemClick:r=>{const d=`${ua(r,p)}`,c=K(h.state?.pathnameStackToGoBack,h.pathname);s(d,{state:{pathnameStackToGoBack:c}})},onLoadPreviousTransactionsClick:(r,d)=>{e(ot({timePeriod:Ie(r),numberOfQuartersFetched:d})),e(st(l,Ie(r),!0,!0))}}}))(zn);function He({referrerType:e,isFiling1099FeatureEnabled:a}){const s=$(),t=H(),n=N(),i=$n(),[l,p]=u.useState(!1),[h,v]=u.useState(!1),[m,r]=u.useState(!1),d=Y(),c=d.vendorId,T=d.qboId,{tenantEmailDomain:x,timeframe:g,startDate:y,endDate:b}=d,I={id:T??"",name:"",type:"vendor",zeniId:c??"",qboId:T??""};u.useEffect((()=>{g!=null&&y!=null&&b!=null?p(!0):(p(!1),m===!1&&(r(!0),s(we(I,"EntityDetail"))))}),[g,y,b]);const V=ne(),C=f((_=>U(_))),w=f((_=>c!=null?Ot(_,c,I):void 0)),A=f((_=>_.vendorState.vendorByID[c??""])),j=f((_=>U(_).company?.companyInfo.firstMonthOfFY??1)),O=f((()=>Mt(j,2))),E=Ie({startDate:O.startDate,endDate:Nt()}),D=Gt(j),F=f((_=>$t(_.trendWithTransactionsState,I,"EntityDetail"))),[z,S]=u.useState(!1),be=l===!1&&m===!1?void 0:F?.selectedPeriod?.timePeriod??D;return u.useEffect((()=>(e==null&&w?.fetchState!=="Not-Started"||c==null||s(zt(c,I)),()=>{e!=null&&c!=null&&s(Yt(c))})),[c,t.state,s]),u.useEffect((()=>{w?.fetchState==="Completed"&&w?.vendorViewDetails.vendorView?.vendorBasic!=null&&((_,ae,ye)=>{_.id!=null&&P.trackVendorDetails(_.id,_.name,ye,_.account?.accountName,_.class?.className,_.owner?.email,ae.percentChange,ae.last30DaysSpend,ae.last90DaysSpend,ae.yearToDateSpend)})(w?.vendorViewDetails.vendorView?.vendorBasic,w?.vendorSpend,e),S(!1)}),[w?.fetchState]),u.useEffect((()=>{if(w?.fetchState==="Completed"&&z===!1){be!=null&&l===!1&&(s(Ce(I,"EntityDetail",{timeframe:F?.selectedPeriod?.timeframe??"quarter",timePeriod:be},j)),S(!0));const _=ht.getLocalizedStrings().dateFormat.analytics;if(l===!0&&g!=null&&y!=null&&b!=null){S(!0);const ae=g,ye={startDate:Ne(y,_.YYYYDashMMDashDDFormat),endDate:Ne(b,_.YYYYDashMMDashDDFormat)};s(Ce(I,"EntityDetail",{timeframe:ae,timePeriod:ye}))}}}),[w?.fetchState,be,F?.selectedPeriod?.timeframe,l,j]),u.useEffect((()=>{w?.fetchState==="Completed"&&h===!1&&(s(ot({timePeriod:E,numberOfQuartersFetched:3})),s(st(I,w.allTransactionsTabData?.timePeriod??E,!1,!0)),v(!0))}),[w?.fetchState,h]),c==null?o.jsx(fe,{}):o.jsx(Fa,{windowSize:V,children:o.jsx(ka,{location:t,navigate:n,isFiling1099FeatureEnabled:a,vendorDetailView:w,vendorId:c,currentTenant:C,selectedVendor:A,firstMonthOfFY:j,isTrendPeriodSelected:l,selectedPeriodTimePeriod:F?.selectedPeriod?.timePeriod,defaultTransactionTimePeriod:D,vendorEntity:I,currentUserRoleMap:i?.loggedInUserRoleMap,tenantEmailDomain:x})})}const Pa=ht.getLocalizedStrings().spendManagement.billPay.vendorCreation.vendorDetails,ja={containerWidth:new Ue(100,58)},_a=L(qn)`
|
|
22
|
-
width: ${q.sp4};
|
|
23
|
-
height: ${q.sp4};
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
26
|
-
`,Aa=L.div`
|
|
27
|
-
display: flex;
|
|
28
|
-
height: 100vh;
|
|
29
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
30
|
-
width: 100%;
|
|
31
|
-
overflow-y: scroll;
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,Ra=L.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
width: ${e=>`${ja.containerWidth.value(e.windowSize)}%`};
|
|
37
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
38
|
-
`,Ua=G((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},i=e.vendorFiling1099UploadDetailsState,l=e.vendorFiling1099UploadDetailsState;let p={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(p=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{uploadInvoiceEndPoint:`${mt.documentAIMicroServiceBaseUrl}`,vendorFiling1099UploadDetailsState:i,vendorFiling1099UploadDetailsViewState:l,uploadStaus:l.w9FormUploadStatus,authParams:n,billId:a.billId,vendorId:a.vendorId,file:a.file,showAutofill:a.showAutofill,type:a.type,analytics:P,entityId:a.billId,fetchVendorFetchStatus:p,vendorLegalName:a.vendorLegalName}}),(function(e,a){const s=a.vendorId;return{onInvoiceUpload:t=>{if((function(n){return n!=null&&"w9_form"in n})(t)&&(e(on({w9FormFile:t.files[0]})),t.w9_form[0]!=null)){e(sn({ocrData:t.w9_form[0],vendorId:s}));const n=(i=>({street:[i.street.join(" ")],city:i.city,state:i.state,postalCode:i.postal_code,countryCode:i.country_code??void 0,country:i.country??""}))(t.w9_form[0].address);e(ct({addressType:"vendor_address",addressToCreate:n}))}},updateInvoiceUploadFetchState:t=>{e(De({fetchState:t,error:void 0}))},onSkipAutofill:t=>{e(an(t))},onVendorFiling1099UploadDetailsSave:t=>{e(lt(t))},onDeleteClick:()=>{e(De({fetchState:"Not-Started",error:void 0})),e(dt({vendorId:s,w9Documents:[]}))}}}))(Hn);function Qe({appContent:e,showFullScreenSkeletonWhileLoading:a}){const s=$(),t=N(),{vendorId:n}=Y(),i=ne(),l=xe(),p=R.getSignedInUser(),[h,v]=u.useState(!1),{useFeatureGate:m}=Q(),{isFeatureEnabled:r}=m(M.isVendorRecommendationFeatureEnabled),d=f((D=>U(D))).companyName,c=new AbortController,T=c.signal;let x,g,y,b,I;if(n==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");x=f((D=>it(D,n))),g=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsSaveStatus)),y=f((D=>D.vendorViewState.editVendorStateById[n]?.fetchStatus)),I=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsLocalData.w9Documents?.[0])),b=f((D=>D.vendorFiling1099UploadDetailsState));const V=y?.fetchState==="In-Progress"||b?.w9FormUploadStatus?.fetchState==="In-Progress",C=()=>{l.toggle()};u.useEffect((()=>()=>{c.abort(),s(rt(n))}),[]),u.useEffect((()=>{h||n!=null&&(v(!0),s(tn(!1,n,T)))}),[n]);const w=Ke(y?.fetchState),A=Ke(g?.fetchState),j=x.vendor?.contactIds,O=j?.[j.length-1],E=f((D=>D.contactState.contactById[O]));if(u.useEffect((()=>{n!=null&&w==="In-Progress"&&y?.fetchState==="Completed"&&x?.vendor!=null&&(s(nn(n,x.vendor,E)),x?.vendor.filing1099W9Files?.[0]!=null&&s(De({fetchState:"Completed",error:void 0})))}),[n,x?.vendor]),u.useEffect((()=>{A==="In-Progress"&&g?.fetchState==="Completed"&&t("../../vendors/filing_1099")}),[g?.fetchState]),a===!0&&y?.fetchState!=="Completed"&&y?.fetchState!=="Error")return o.jsx(Na,{children:o.jsx(Jn,{})});if(p==null)throw Error("Can't access VendorFiling1099UploadScreen without signing in...");return o.jsxs(Aa,{windowSize:i,children:[i!=="small"?o.jsxs(La,{children:[o.jsx(_a,{onClick:C}),o.jsxs(Ba,{showContent:p.userEmailDomain==="zeni.ai",children:[o.jsx(Oa,{showAutofill:!1}),o.jsx(Ma,{showAutofill:!1,children:d})]})]}):null,o.jsx(Ua,{vendorId:n,file:I,showAutofill:!1,type:"w9",isVendorRecommendationEnabled:r,pdfTitle:I?Pa.w9FormTitle:void 0,showTitlebar:!0,showTitlebarIcon:!0,vendorLegalName:x?.vendor?.legalName,isLoading:V}),o.jsx(Ra,{windowSize:i,children:e})]})}const Ba=L.div`
|
|
39
|
-
display: ${e=>e.showContent?"flex":"none"};
|
|
40
|
-
align-items: center;
|
|
41
|
-
`,La=L.div`
|
|
42
|
-
margin-bottom: ${q.sp3};
|
|
43
|
-
margin-top: ${q.sp3};
|
|
44
|
-
margin-left: ${q.sp8};
|
|
45
|
-
position: absolute;
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
`,Oa=L.div`
|
|
49
|
-
width: 1px;
|
|
50
|
-
height: ${q.sp3};
|
|
51
|
-
margin: ${q.sp0} ${q.sp3};
|
|
52
|
-
background-color: ${e=>e.showAutofill?ft.neutralGrey1Light:e.theme.colors.hero};
|
|
53
|
-
`,Ma=L(Kn.StandardMedium)`
|
|
54
|
-
color: ${e=>e.showAutofill?ft.neutralGrey5Light:e.theme.colors.primary};
|
|
55
|
-
`,Na=L.div`
|
|
56
|
-
width: 100%;
|
|
57
|
-
height: 100vh;
|
|
58
|
-
overflow: hidden;
|
|
59
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
60
|
-
`,Ga=G((function(e){const a=rn(e);return{vendorDetailView:dn(e),globalMerchantView:a}}),(function(e,a){const{navigate:s}=a;return{updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t}))},fetchRecommendation:t=>{e(cn("tenant",t))},onSaveClick:()=>{e(ln())},onBackClick:()=>{s("../review")}}}))(Qn);function $a(){const e=N();return o.jsx(Ga,{navigate:e})}const za=L.div`
|
|
61
|
-
display: flex;
|
|
62
|
-
min-height: 100%;
|
|
63
|
-
width: 100%;
|
|
64
|
-
flex: 1 1 auto;
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
align-items: center;
|
|
67
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
68
|
-
`,Ya=G((function(e,a){const{vendorFirstReviewDetails:s}=a,t=e.globalMerchantAutoCompleteState.autoCompleteText,n=R.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},p=U(e);return{vendorFirstReviewView:s,globalMerchantAutoCompleteData:{globalMerchantAutoCompleteView:s.globalMerchantAutoCompleteView,autoCompleteText:t},analytics:P,authParams:l,attachmentEndpoint:p.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ee}/vendor_attachments_accounting_provider`:`${ee}/vendor_attachments`}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorReviewView:(t,n,i)=>{e(Ve(t,n,i))},onGlobalMerchantAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?e(vn({searchString:t,globalMerchantType:n??"vendor"})):t.trim().length===0&&e(qe())},onUpdateLocalData:(t,n,i,l)=>{if(n!=null){const p=Ja(n);e(gn({vendorId:t,currentSelection:p,selectedGlobalMerchantId:i,vendorRenamedText:l}))}},onResetVendorLocalData:t=>{e(Sn({vendorId:t}))},onVendorNameClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onUpdatePageToken:t=>{e(fn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(mn({sortOrder:t,sortKey:n}))},onUpdateScrollYOffset:t=>{e(hn({scrollYOffset:t}))},onClickSave:(t,n,i)=>{e(pn(t,n,i))},onClickCancelPopup:()=>{e(un())},onClearGlobalMerchantAutoCompleteResults:()=>{e(qe())},onClickRedirectToQBO:()=>{window.open(`${Be.qboRedirectionUrl}/vendors`,"_blank")},updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t})),s(`./vendor/${t.id}`)},onBackClick:()=>{s("../..")},onReloadList:()=>{e(Ve(null))}}}))(Wn);function We(){const e=N(),a=$(),s=H(),{tenantEmailDomain:t}=Y(),n=ne(),i=R.getSignedInUser(),{vendorId:l}=Y(),p=f((d=>Je(d))),[h,v]=u.useState(!1),m=f((d=>Je(d).fetchState));if(u.useEffect((()=>{m==="Not-Started"&&h===!1&&(a(Ve(null)),v(!0))}),[]),i==null)throw Error("Can't access first review page without signing in...");const r=d=>d.trackPageLoaded(Le.Event.vendorTenantReviewListPage);return o.jsxs(o.Fragment,{children:[m==="Completed"?o.jsx(Se,{analytics:P,onLoad:r}):null,o.jsx(Se,{analytics:P,onLoad:r}),o.jsx(ha,{isOpen:l!=null,drawerLeftMargin:new Ue(0,0,300,600),onClose:()=>{e("../review")},children:o.jsx(qa,{onClick:d=>d.stopPropagation(),children:o.jsx($a,{})})}),o.jsx(za,{windowSize:n,children:o.jsx(Ya,{location:s,navigate:e,vendorFirstReviewDetails:p,tenantEmailDomain:t})})]})}const Ja=e=>e.recommendedFirst===!0?"recommendedFirst":e.recommendedSecond===!0?"recommendedSecond":e.retain===!0?"retain":e.rename===!0?"rename":e.customMerchant===!0?"customMerchant":null,qa=L(St)`
|
|
69
|
-
display: flex;
|
|
70
|
-
min-height: 100%;
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
`,Ka=G((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=e.vendorFiling1099UploadDetailsState,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""};let l={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(l=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{analytics:P,vendorFiling1099UploadDetailsViewState:n,authParams:i,googleAPIKey:Be.googleMapsAPIKey,vendorId:a.vendorId,fetchVendorFetchStatus:l,vendor:a.vendorFiling1099UploadDetails?.vendor}}),(function(e,a){const{currentTenant:s,navigate:t,location:n,vendorId:i,vendorFiling1099UploadDetails:l}=a,{tenantEmailDomain:p}=s;return{onVendorFiling1099UploadDetailsSave:h=>{e(lt(h)),P.trackVendor1099DetailSave(l.vendor.legalName??"")},onSaveChangesToLocalStore:h=>{e(dt(h))},onResetVendorFiling1099FormStatus:()=>{e(Tn())},onAddressEditHandler:h=>{const v=aa((m=>({street:m.vendor1099FilingSectionId.street,suite:m.vendor1099FilingSectionId.suite,city:m.vendor1099FilingSectionId.city,state:m.vendor1099FilingSectionId.state,country:m.vendor1099FilingSectionId.country,countryCode:m.vendor1099FilingSectionId.countryCode,postalCode:m.vendor1099FilingSectionId.postalCode,secondaryInfo:m.vendor1099FilingSectionId.secondaryInfo}))(h));e(ct({addressType:"vendor_address",addressToCreate:v}))},goBackToListPage:()=>{e(rt(i));const h=`/${p}/vendors/filing_1099/`,v=K(n.state?.pathnameStackToGoBack,n.pathname);t(h,{state:{pathnameStackToGoBack:v}})},onAddressClick:h=>{const v=(function(r,d,c){let T=`/${r}/vendors/filing_1099/upload/${c}/edit`;return T=T.concat(`/new/${d}`),T})(p,h,i),m=K(n.state?.pathnameStackToGoBack,n.pathname);t(v,{state:{pathnameStackToGoBack:m}})},AddressFormPage:Zn}}))(Xn);function Ha(){const e=N(),a=H(),{vendorId:s}=Y(),t=f((p=>U(p)));let n;if(s==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");n=f((p=>it(p,s)));const{tenantEmailDomain:i}=t,l=t.companyId??R.getSignedInUserTenant(i)?.companyId;if(l==null)throw new Error("Company ID not found for Vendor Filing 1099 Details Screen");return o.jsx(Ka,{location:a,navigate:e,currentTenant:t,vendorId:s,vendorFiling1099UploadDetails:n,companyId:l})}const Qa=L.div`
|
|
73
|
-
display: flex;
|
|
74
|
-
min-height: 100%;
|
|
75
|
-
width: 100%;
|
|
76
|
-
flex: 1 1 auto;
|
|
77
|
-
flex-direction: column;
|
|
78
|
-
align-items: center;
|
|
79
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
80
|
-
`,Wa=G((function(e,a){const{vendorsFiling1099ListDetails:s,accountMappingView:t,analytics:n}=a;return{analytics:n,vendorsFiling1099List:s.vendors,isVendor1099Populated:s.isVendor1099Populated,accountMappingView:t,fetchState:s.fetchState,uiState:s.uiState,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow}}),(function(e,a){const{navigate:s,analytics:t}=a;return{onUpdateSortUiState:(n,i)=>{e(Vn({sortOrder:n,sortKey:i}))},onUpdateSearchUiState:n=>{e(Dn({searchString:n}))},onVendorRowClick:n=>{if(a.tenantEmailDomain!=null){const i=`/${a.tenantEmailDomain}/vendors/filing_1099/upload/${encodeURIComponent(n)}/edit`,l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onReloadVendors:()=>{e(Ee(!0))},onBackClick:()=>{e(In()),e(Cn())},onVendorTabSelectionChanged:n=>{const i=de(n);s(i),e(te(le(n)))},onAccountMappingChange:n=>{const{filing1099:i}=n,{bankAccount:l,expenseCategory1099:p}=i,h=ma(a.accountMappingView.bankAccounts1099FilingAccountList,l.selectedOptions),v=fa(a.accountMappingView.expenseAccounts1099FilingAccountList,p),m={selectedBankAccounts1099FilingAccountIds:h.map((r=>r.accountId)),selectedExpenseAccounts1099FilingAccountIds:v};e(wn({data:m}))},onSaveClick:()=>{e(yn()),t.track(Le.Event.vendor1099TabSettingsSave)}}}))(ea);function Xe({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=$(),i=H(),{tenantEmailDomain:l}=Y(),p=ne(),h=R.getSignedInUser(),[v,m]=u.useState(!1),[r,d]=u.useState(!1);if(h==null)throw Error("Can't access vendor filing 1099 page without signing in...");ce();const c=f((C=>xn(C))),T=f((C=>bn(C))),{isAiCfoAccessEnabled:x,onAskAiCfoClick:g}=ie({mobileExploreReferrer:"Vendors — 1099"});se({isDataReady:c.fetchState==="Completed"}),u.useEffect((()=>{r||(d(!0),n(Ee(!1)))}),[r,d]),u.useEffect((()=>{T.saveState.fetchState==="Completed"&&n(Ee(!1))}),[T.saveState.fetchState]);const y=C=>{m(C)},b=f((C=>U(C))),I={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:b.tenantId},V=u.useMemo((()=>({authParams:I,tenantName:b.companyName,filing1099ReportEndPoint:`${ee}/filing1099Reports`})),[]);return o.jsxs(o.Fragment,{children:[c.fetchState==="Completed"?o.jsx(o.Fragment,{children:o.jsx(Se,{analytics:P,onLoad:()=>P.trackPageLoaded(Le.Event.vendor1099ListPage)})}):null,o.jsxs(Qa,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:v,handleDrawerToggle:y}),o.jsx(Wa,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,analytics:P,vendorsFiling1099ListDetails:c,vendorTypeList:c.vendorTypeList,accountMappingView:T,downloadParams:V,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:x,onAskAiCfoClick:g,onClickMenuIcon:()=>{y(!0)}})]})]})}const Xa=L.div`
|
|
81
|
-
display: flex;
|
|
82
|
-
min-height: 100%;
|
|
83
|
-
width: 100%;
|
|
84
|
-
flex: 1 1 auto;
|
|
85
|
-
flex-direction: column;
|
|
86
|
-
align-items: center;
|
|
87
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
88
|
-
`,Za=G((function(e,a){const{vendorsListDetails:s}=a;return{vendorsList:s.vendors,totalVendorCount:s.totalVendorCount,fetchState:s.fetchState,uiState:s.uiState,searchText:s.searchString,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow,isAccountingClassesEnabled:me(e),analytics:P}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorsList:(t="",n,i)=>{e(_n({searchString:t,keepExistingListItems:n,view:"vendorsTab",pageToken:i}))},onUpdatePageToken:t=>{e(jn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(Pn({sortOrder:t,sortkey:n}))},onUpdateCurrentYTDSelection:t=>{e(kn({ytdSpendSelection:t}))},onVendorRowClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Vendor List"}})}},onReloadVendors:()=>{console.log("Reload vendors")},onUpdateScrollYOffset:t=>{e(Fn({scrollYOffset:t}))},onBackClick:()=>{s("../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))}}}))(ta);function eo({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=$(),i=H(),{tenantEmailDomain:l}=Y(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=Q(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled);ce();const d=e.includes("prepaid_expenses"),c=e.includes("fixed_assets"),T=e.includes("accrued_expenses"),x=f((F=>oe(F)));let g={};g=f((F=>En(F,"vendorsTab")));const[y,b]=u.useState(!1),{isAiCfoAccessEnabled:I,onAskAiCfoClick:V}=ie({mobileExploreReferrer:"Vendors Summary"});se({isDataReady:g.fetchState==="Completed"});const C=f((F=>ue(F))),w=f((F=>J(F).isReportGenerated));f((F=>J(F).fetchState))==="Completed"&&w&&m&&!e.includes("operating_expenses_by_vendor")&&e.splice(1,0,"operating_expenses_by_vendor");const[A,j]=u.useState(!1);if(u.useEffect((()=>{(d||c)&&A===!1&&C!=="Completed"&&(n(pe()),j(!0))}),[A]),u.useEffect((()=>{n(he({shouldFetchAccruedExpenses:T,shouldFetchFixedAssets:c,shouldFetchPrepaidExpenses:d,shouldFetchOpexByVendor:m&&r===!1,shouldFetchVendorsList:!0,shouldFetchFiling1099Vendor:!1}))}),[C,c,r,m]),u.useEffect((()=>{y||g.fetchState!=="Completed"||(b(!0),P.trackVendorList(x.currentTab,x.previousTab??null,g.totalVendorCount,g.uiState.sortKey,g.uiState.ytdSpendSelection))}),[g.fetchState]),h==null)throw Error("Can't access address page without signing in...");const[O,E]=u.useState(!1),D=F=>{E(F)};return o.jsxs(Xa,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:O,handleDrawerToggle:D}),o.jsx(Za,{location:i,navigate:t,vendorsListDetails:g,tenantEmailDomain:l,vendorTabsToShow:e,onClickMenuIcon:()=>{D(!0)},previousTabPosition:a,setPreviousTabPosition:s,isAiCfoAccessEnabled:I,onAskAiCfoClick:V})]})}function Fo(){const{useFeatureGate:e}=Q(),a=H().state?.referrer,[s,t]=u.useState(!1),[n,i]=u.useState(0),l=R.getSignedInUser(),p=An(l),{isFeatureEnabled:h}=e(M.isOpexByVendorFeatureEnabled),{isFeatureEnabled:v}=e(M.isVendorReviewFeatureEnabled),{isFeatureEnabled:m}=e(M.isScheduledJEPrepaidExpensesFeatureEnabled),{isFeatureEnabled:r}=e(M.isScheduledJEFixedAssetsFeatureEnabled),{isFeatureEnabled:d}=e(M.isScheduledJEAccruedExpensesFeatureEnabled),{isFeatureEnabled:c}=e(M.isFiling1099FeatureEnabled),T=f((V=>U(V))),x=T?.externalConnections?.accounting[0]?.connectionName,g=["vendors_tab"];x!=="netsuite"&&m===!0&&g.push("prepaid_expenses"),x!=="netsuite"&&r===!0&&g.push("fixed_assets"),x!=="netsuite"&&d===!0&&g.push("accrued_expenses"),x!=="netsuite"&&c&&p&&(g.push("filing_1099"),h&&g.splice(1,0,"operating_expenses_by_vendor"));const{isFeatureEnabled:y}=e(M.isDebitCardFeatureEnabled),b=Rn(y,T),I=Un(T);return b===!0||I===!0?o.jsx(Me,{children:o.jsx(k,{path:"/*",element:o.jsx(sa,{})})}):o.jsxs(Me,{children:[o.jsx(k,{path:"/opex",element:h===!0?o.jsx(Da,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(B,{to:"../summary"})}),o.jsx(k,{path:"/summary",element:o.jsx(eo,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g})}),o.jsx(k,{path:"schedules/fixed_assets/details/:scheduleDetailId",element:r===!0?o.jsx(ia,{}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/accrued_expenses/details/:scheduleDetailId",element:r===!0?o.jsx(ra,{shouldNavigateBack:s,setShouldNavigateBack:t}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/one_time_accrual/details/:accrualId",element:d===!0?o.jsx(da,{}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/:scheduleType/details/:scheduleDetailId",element:m===!0?o.jsx(la,{}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/:scheduleType/details/:scheduleDetailId/edit_link",element:m===!0||r===!0?o.jsx(va,{}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/accrued_expenses/details/:scheduleDetailId/edit_link",element:d===!0?o.jsx(ca,{setShouldNavigateBack:t}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/prepaid_expenses",element:m===!0?o.jsx(Ea,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"schedules/fixed_assets",element:r===!0?o.jsx(wa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"schedules/accrued_expenses",element:d===!0?o.jsx(ba,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"/filing_1099",element:c&&p?o.jsx(Xe,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"/filing_1099/:vendorId",element:c&&p?o.jsx(Xe,{vendorTabsToShow:g,previousTabPosition:n,setPreviousTabPosition:i}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"/filing_1099/upload/:vendorId/edit",element:c&&p?o.jsx(Qe,{appContent:o.jsx(Ha,{}),showFullScreenSkeletonWhileLoading:!0}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"/filing_1099/upload/:vendorId/edit/new/:addressType",element:c&&p?o.jsx(Qe,{appContent:o.jsx(oa,{isSubPage:!0,hideAddressBackButton:!0,hideAddressSubTitle:!0})}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"/summary/:vendorId/:qboId",element:o.jsx(He,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(k,{path:"/summary/:vendorId/:qboId/:timeframe/:startDate/:endDate",element:o.jsx(He,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(k,{path:"/review",element:v===!0?o.jsx(We,{}):o.jsx(fe,{})}),o.jsx(k,{path:"/review/vendor/:vendorId",element:v?o.jsx(We,{}):o.jsx(fe,{})}),o.jsx(k,{path:"/",element:o.jsx(B,{to:"summary"})}),o.jsx(k,{path:"*",element:o.jsx(fe,{})})]})}export{Fo as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-DOBkg1D1.js";import{a as f}from"./sentry-B0nIwgR6.js";import{t as u,u as h,j as y,N as I}from"./core-D5xlmXJj.js";import{TO as b,ge as w,IR as j}from"./zeni-epic-state-DVQQo6UD.js";import{z as l,a7 as x,af as S,ag as D}from"./index-waurk8Yr.js";import{n as c}from"./mui-DpenkF9f.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.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]="841e56d5-dec7-495b-ad7a-59afe110dc98",e._sentryDebugIdIdentifier="sentry-dbid-841e56d5-dec7-495b-ad7a-59afe110dc98")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y((m=>b(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(T,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,T=c(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{B as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-DOBkg1D1.js";import{a as u}from"./sentry-B0nIwgR6.js";import{h as x,u as j,g as v,i as B,j as p}from"./core-D5xlmXJj.js";import{Sw as s,Sv as T,_T as $,fB as C,_U as E}from"./zeni-epic-state-DVQQo6UD.js";import{a1 as _,ae as g,E as z,z as D,a7 as L,d4 as P,a4 as U}from"./index-waurk8Yr.js";import{n as N}from"./mui-DpenkF9f.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5fc3c077-92d8-4b99-a7f1-bae5afc93416",e._sentryDebugIdIdentifier="sentry-dbid-5fc3c077-92d8-4b99-a7f1-bae5afc93416")}catch{}})();const G=N.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function H(){const e=x(),n=j(),d=_(),f=v();let{accountId:a}=B(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,h]=u.useState(!1),y=z();u.useEffect((()=>{m||(h(!0),n(T(a??"",!1)))}),[m,n]);const o=p((t=>$(t,a??""))),b=()=>{const t=U(f.state?.pathnameStackToGoBack),k=t.poppedPathname??"..";e(k,{state:{pathnameStackToGoBack:t.newStack}})},c=D.getSignedInUser(),r=p((t=>C(t))),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=E(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",S=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(P,{currentTenantCompanyName:S,statementListView:o,accountLast4:w,onBackClick:b,authParams:I,downloadEndPoint:l})})}export{H as Z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a0 as n}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import"./sentry-B0nIwgR6.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]="f6941a2d-d06d-4ecc-903f-b350d6e88764",e._sentryDebugIdIdentifier="sentry-dbid-f6941a2d-d06d-4ecc-903f-b350d6e88764")}catch{}})();function r(e){if(e.companyLocaleInfo!=null&&e.companyLocaleInfo.languageCode.length>0&&e.companyLocaleInfo.companyIncCountryCode.length>0){const o=`${e.companyLocaleInfo.languageCode.toLowerCase()}-${e.companyLocaleInfo.companyIncCountryCode.toUpperCase()}`;return console.warn(`localeID ${o}`),n(o)??"en"}return"en"}export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{br as u,dl as i}from"./zeni-epic-state-DVQQo6UD.js";import{G as $}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import"./sentry-B0nIwgR6.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="61189c2d-d040-4f20-9f69-8367ea8ac167",e._sentryDebugIdIdentifier="sentry-dbid-61189c2d-d040-4f20-9f69-8367ea8ac167")}catch{}})();const{dateFormat:{analytics:{YYYYDashMMDashDDFormat:s}}}=$.getLocalizedStrings();function D(e,n){return`/${n}/transaction/${encodeURIComponent(e.type)}/${e.id}`}const l=["prepaid_expenses","fixed_assets","accrued_expenses","one_time_accrual"];function R(e){return e!=null&&l.includes(e)}function U(e,n,o){return`${o.trim()===""?"":`/${o}`}/vendors/schedules/${e}/details/${n}`}const b=(e,n)=>e!=null&&e.length>0&&n!=null&&n.length>0;function y(e,n,o,t,a,d,r=!0){let c=`/${e}/transactions/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${a}/${d.startDate.format(s)}/${d.endDate.format(s)}/${encodeURIComponent(t)}`;return c=r===!1?`${c}/exclude_subaccounts`:`${c}/include_subaccounts`,c}const _=(e,n)=>({startDate:i(u(),n,Math.abs(e),"year"),endDate:u()});function g(e,n,o,t,a,d,r){return`/${e}/transactions/by-class/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${encodeURIComponent(t)}/${d}/${r.startDate.format(s)}/${r.endDate.format(s)}/${encodeURIComponent(a)}`}function h(e,n,o,t,a,d,r){return`/${e}/transactions/by-project/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${encodeURIComponent(t)}/${d}/${r.startDate.format(s)}/${r.endDate.format(s)}/${encodeURIComponent(a)}`}function x(e,n){return`/${n}/${e.type}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`}const v=(e,n,o,t)=>{let a=`/${o}/vendors/summary/${encodeURIComponent(e)}/vendor_${encodeURIComponent(n)}`;return t!=null&&(a+=`/${t.balanceTimeFrame}/${t.startDate.format(s)}/${t.endDate.format(s)}`),a};function w(e,n,o){let t=`/${e}/address`;return t=o!=null?t.concat(`/edit/${n}/${encodeURIComponent(o)}`):t.concat(`/new/${n}`),t}function Y(e){return`/${e}/vendors/schedules/prepaid_expenses`}function F(e){return`/${e}/vendors/schedules/fixed_assets`}const m=["explore","new_chat","routines","skills"];function M(e){return m.some((n=>n===e))}export{g as a,h as b,D as c,w as d,F as e,x as f,Y as g,b as h,R as i,M as j,_ as p,U as s,y as t,v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bt as n}from"./index-waurk8Yr.js";import"./sentry-B0nIwgR6.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="4d67b72c-e724-47af-9238-03e07a44517b",e._sentryDebugIdIdentifier="sentry-dbid-4d67b72c-e724-47af-9238-03e07a44517b")}catch{}})();function f(){return n("dashboard")}export{f as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./sentry-B0nIwgR6.js";import{h as b,g,i as h,j as S}from"./core-D5xlmXJj.js";import{fB as y}from"./zeni-epic-state-DVQQo6UD.js";import{a as k,a1 as C,d as A,ar as T,s as I,p as w,au as D}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.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]="48e71f66-4e39-4840-a6a5-757693f16425",e._sentryDebugIdIdentifier="sentry-dbid-48e71f66-4e39-4840-a6a5-757693f16425")}catch{}})();function B(e){const{mobileExploreReferrer:t}=e,{isAiCfoOpen:r,setIsAiCfoOpen:i}=k(),s=b(),o=g(),{tenantEmailDomain:n}=h(),c=C(),f=D(c),d=A(),p=T(),m=S((a=>a.tenantState.fetchState==="Completed"||a.tenantState.activeTenantFetchState.fetchState==="Completed"?y(a):void 0)),l=m?.masterTOSInfo?.isMasterTOSAccepted??!1;return{isAiCfoAccessEnabled:p&&d&&!r,onAskAiCfoClick:u.useCallback((()=>{if(n!=null)if(l)if(f){const a=w(o.state?.pathnameStackToGoBack,o.pathname);s(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:a,referrer:t}})}else i(!0);else I({location:o,navigate:s,mergeState:{referrer:t}})}),[l,f,o,t,s,i,n])}}export{B as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-B0nIwgR6.js";import{aK as _,aL as m}from"./index-waurk8Yr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d6d113d1-f575-4bfd-9cb1-c1cb87edadfc",e._sentryDebugIdIdentifier="sentry-dbid-d6d113d1-f575-4bfd-9cb1-c1cb87edadfc")}catch{}})();const v=e=>{const{events:n,onEvent:c,onSubscribed:h}=e,f=_(),y=r.useRef(c),p=r.useRef(h),g=r.useRef(0);r.useEffect((()=>{y.current=c}),[c]),r.useEffect((()=>{p.current=h}),[h]);const E=r.useMemo((()=>[...n].sort().join("|")),[n]);r.useEffect((()=>{if(f==null||n.length===0)return;const o=[],i=new Set,w=()=>{if(p.current==null)return;const t=Date.now();t-g.current<5e3||(g.current=t,p.current())};return n.forEach((t=>{const[d,u]=m(t);if(u==="")return;const b=f.channel(d),a=l=>{y.current(u,l)};let s;if(b?.subscribed===!0)s=b,s.bind(u,a),i.has(d)||(i.add(d),w()),o.push((()=>{b.unbind(u,a)}));else{if(s=b??f.subscribe(d),s.bind(u,a),!i.has(d)){i.add(d);const l=()=>{w()};s.bind("pusher:subscription_succeeded",l),o.push((()=>{s.unbind("pusher:subscription_succeeded",l)}))}o.push((()=>{s.unbind(u,a)}))}})),()=>{o.forEach((t=>t()))}}),[f,E])};export{v as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./sentry-B0nIwgR6.js";import{u as P}from"./plaid-D5L6VoNT.js";import{u as x,j as m}from"./core-D5xlmXJj.js";import{UX as C,Fg as U,LO as R,Bv as w,UY as $,fB as F,gJ as N,B9 as T,UZ as B}from"./zeni-epic-state-DVQQo6UD.js";import{aJ as V,z as q}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="32cbb769-c6e3-494a-8757-4567f633f2ce",t._sentryDebugIdIdentifier="sentry-dbid-32cbb769-c6e3-494a-8757-4567f633f2ce")}catch{}})();const J=new Set($),Z=({companyId:t})=>{const n=x(),i=m((e=>e.plaidAccountViewState.external_account.plaidConnectionDetails.link_external_account)),s=m((e=>e.plaidAccountViewState.external_account.plaidConnectionDetails.update_account)),d=m((e=>C(e.paymentAccountState))),c=a.useRef(!1),[o,u]=a.useState(void 0),[r,l]=a.useState(!1);a.useEffect((()=>{n(U())}),[n]);const f=a.useCallback((e=>{t!=null&&(n(R(e,t,"external_account",void 0,o!=null?"update_account":"link_external_account")),c.current=!1,o!=null&&l(!0))}),[n,t,o]),A=a.useCallback((()=>{c.current=!1,u(void 0),l(!1)}),[]),p=o!=null?s:i,D=p.fetchStatus.fetchState==="Completed"?p.linkToken??null:null,{open:g,ready:h}=P({token:D,onSuccess:f,onExit:A});a.useEffect((()=>{c.current&&h&&(g(),c.current=!1)}),[h,g]);const b=p.fetchStatus.fetchState;a.useEffect((()=>{b==="Error"&&(c.current=!1)}),[b]);const E=a.useCallback((()=>{t!=null&&(u(void 0),c.current=!0,n(w("external_account","link_external_account")))}),[n,t]),v=a.useCallback((e=>{t!=null&&(u(e),l(!1),c.current=!0,n(w("external_account","update_account",e)))}),[n,t]),_=s.fetchStatus.fetchState==="In-Progress"||s.updateStatus.fetchState==="In-Progress"?"In-Progress":s.fetchStatus.fetchState==="Error"||r&&s.updateStatus.fetchState==="Error"?"Error":"Not-Started";return{plaidAccounts:a.useMemo((()=>d.map((e=>{const L=V(e.institutionDetails?.logo);return{accountId:e.paymentAccountId,name:e.institutionDetails?.institutionName??e.accountName,mask:e.accountLast4Digits,balanceFormatted:(S=e.balances?.current?.amount,y=e.balances?.current?.currencySymbol,S==null?"":`${y??"$"}${S.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`),isActive:J.has(e.providerVerificationStatus?.code??""),isLoginRequired:e.isLoginRequired,reLoginStatus:e.paymentAccountId===o?_:"Not-Started",institutionLogoUrl:L};var S,y}))),[d,o,_]),onAddPlaidAccount:E,onReLoginPlaidAccount:v}},I="email_connect_result",k="onboarding_step",G=()=>{const t=x(),n=m((o=>F(o).tenantId)),i=q.getSignedInUser()?.userId,s=a.useRef(!1),[d,c]=a.useState(null);return a.useEffect((()=>{if(s.current||i==null||i===""||n==null||n==="")return;const{consumed:o,onboardingStep:u}=(()=>{const r=new URL(window.location.href),l=r.searchParams.has(I),f=r.searchParams.get(k);return l||f!=null?(r.searchParams.delete(I),r.searchParams.delete(k),window.history.replaceState(window.history.state,"",`${r.pathname}${r.search}${r.hash}`),{consumed:l,onboardingStep:f}):{consumed:!1,onboardingStep:null}})();!o&&u==null||(s.current=!0,o&&(t(N(i,n)),c("email")),u!=null&&new Set(["connect_data_source"]).has(u)&&t(T({step:B(u)})))}),[t,n,i]),{pendingAutoFocusTabId:d}};export{Z as a,G as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./sentry-B0nIwgR6.js";import{ay as c}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import{t as l}from"./core-D5xlmXJj.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="02e50011-dc27-4e0d-95d7-2d26ffe7c8b8",e._sentryDebugIdIdentifier="sentry-dbid-02e50011-dc27-4e0d-95d7-2d26ffe7c8b8")}catch{}})();function m(e,d){const{clearParams:f=!0}=d??{},[t,a]=l(),[i,o]=n.useState(),s=n.useRef(!1),u=n.useRef(!1);return n.useEffect((()=>{if(s.current||e==null||!(t.has("thread_id")||t.has("entity_type")))return;const r=c(t,e);r!=null&&(o(r),s.current=!0)}),[t,e]),n.useEffect((()=>{if(!s.current||u.current||!f||!(t.has("thread_id")||t.has("entity_type")))return;const r=new URLSearchParams(t);r.delete("thread_id"),r.delete("entity_type"),a(r,{replace:!0}),u.current=!0}),[t,a,f]),i}export{m as u};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-DOBkg1D1.js";import{R as Q,a as o}from"./sentry-B0nIwgR6.js";import{V as ue,O,y as S,b4 as de,as as me,b9 as pe,b5 as fe,b6 as he,a1 as be,ba as U}from"./index-waurk8Yr.js";import{c as q,n as $}from"./mui-DpenkF9f.js";import{u as Te}from"./useAskAiCfoHostNavButtonProps-buoAy4Wo.js";import{u as Pe,a as ve,b as Ee,c as ye,d as xe,l as Ie,C as Se,e as Ce,f as ge}from"./TransactionDetailScreen-CsnmL0BT.js";import{h as F,g as k,i as j,u as we,j as Oe}from"./core-D5xlmXJj.js";import{sd as $e,V1 as Fe,QO as ke}from"./zeni-epic-state-DVQQo6UD.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="ec1a2106-c921-485f-92e2-8941c3b908f5",t._sentryDebugIdIdentifier="sentry-dbid-ec1a2106-c921-485f-92e2-8941c3b908f5")}catch{}})();const H=$.div`
|
|
2
|
-
${({$active:t})=>t&&q`
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
height: 100%;
|
|
6
|
-
`}
|
|
7
|
-
`,_=$.div`
|
|
8
|
-
${({$active:t})=>t&&q`
|
|
9
|
-
flex: 1;
|
|
10
|
-
min-height: 0;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
box-sizing: border-box;
|
|
14
|
-
min-width: 0;
|
|
15
|
-
overflow-x: hidden;
|
|
16
|
-
overflow-y: auto;
|
|
17
|
-
`}
|
|
18
|
-
`,je=$.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
flex: 1;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
min-height: 0;
|
|
23
|
-
min-width: 0;
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
`,De=Q.memo((({isFullView:t,transactionId:n,transactionType:T,isTransactionCommentingEnabled:p,onBackToList:P,onClose:a})=>{const b=F(),u=k(),{tenantEmailDomain:r}=j(),f=ue(),{useFeatureGate:e}=O(),{isFeatureEnabled:v}=e(S.isCreateTransferEntryFromExpenseEnabled),c=a!=null&&t!==!0,h=f?.currentTenant?.companyId,E=f?.currentTenant?.companyName,{isFeatureEnabled:I}=e(S.isProjectsTransactionsEnabled),{isFeatureEnabled:i}=e(S.isTransactionSplitEnabled),{selectedTransaction:y,transactionDetail:d,tranEntity:C,isChainOfThoughtEnabled:s,defaultTrendTransactionTimePeriod:m,resetTrendIsFetchedStates:g,uncategorizedAccounts:J,vendorSaveStatus:K,isVendorBulkUpdateOnTransactionEnabled:W,isExpenseAutomationEnabled:X,firstMonthOfFY:Z,isCreateVendorDrawerOpen:D,rawDetailSaveStatus:ee,rawDetailLineItemById:V}=Pe(n,T),M=de(),{onRecommendationSelection:A,popup:ne}=ve({isEnabled:s,fallbackTransactionId:n}),ae=o.useMemo((()=>({...M,onRecommendationSelection:A})),[M,A]);Ee(t===!0);const R=o.useRef(V);R.current=V;const x=ye(ee,(()=>{const w=[],G=R.current;if(G!=null)for(const le of Object.values(G)){const B=le.account;B?.accountId!=null&&w.push(B.accountId)}return w})),{transactionId:N,onSaveVendor:te,onSaveSuccess:se,onCancel:ie}=xe({closeDrawerHandler:()=>{},overrideTransactionId:n,overrideTransactionType:T}),{isAiCfoAccessEnabled:oe,onAskAiCfoClick:re}=Te({mobileExploreReferrer:"Transaction Details"}),L=t===!0&&oe;me({isDataReady:t===!0&&d?.fetchState==="Completed"});const z=o.useRef(null);if(o.useEffect((()=>{if(z.current!==n&&d?.fetchState==="Completed"){z.current=n;const w=u.state?.searchContext;Ie(d.transaction,w)}}),[u.state,d,n]),d==null)return l.jsx(H,{$active:c,children:l.jsx(_,{$active:c,children:l.jsx(pe,{})})});const ce=l.jsxs(l.Fragment,{children:[N!=null&&D?l.jsx(Se,{isOpen:D,transactionId:N,onSaveVendor:te,onSaveSuccess:se,onCancel:ie}):null,l.jsx(je,{children:l.jsx(fe,{toolkit:ae,children:l.jsx(Ce,{hideDeleteAttachment:!0,firstMonthOfFY:Z,isDisabled:d?.transaction?.type==="transfer"&&f?.connectionName==="netsuite"?"readonly":void 0,isNavBarVisible:!c,tenantEmailDomain:r??"",location:u,navigate:b,selectedTransaction:y,entity:C,isCOTEnabled:s,isCreateTransferEntryFromExpenseEnabled:v,defaultTrendTransactionTimePeriod:m,resetTrendIsFetchedStates:g,transaction:d?.transaction,uncategorizedAccounts:J,vendorSaveStatus:K,isVendorBulkUpdateOnTransactionEnabled:W,isExpenseAutomationEnabled:X,isAiCfoAccessEnabled:L,onAskAiCfoClick:L?re:void 0,isTransactionCommentingEnabled:p,isProjectsTransactionsEnabled:I,isTransactionSplitEnabled:i,companyId:h,companyName:E,onBackClick:P})})}),ne,x.showPopup&&x.popupType!=null&&l.jsx(he,{popupType:x.popupType,currencySymbol:x.currencySymbol,accountId:x.popupAccountId??"",accountName:x.popupAccountName??"",onSubmit:x.handleSubmit,onDismiss:x.handleDismiss})]});return l.jsx(H,{$active:c,children:l.jsx(_,{$active:c,children:ce})})})),Ve=[];function Me(t){const{childPathPattern:n,enabled:T=!0}=t,p=F(),P=j(),a=k(),b=be(),u=b==="small"||b==="medium-compact",r=P["*"]??"",f=r.match(n),e=T&&!u&&f!=null,v=o.useMemo((()=>new URLSearchParams(a.search).get("view")),[a.search]),c=e&&v==="full",h=f?.slice(1).join("\0"),E=o.useMemo((()=>f==null?Ve:f.slice(1)),[h]),I=o.useMemo((()=>{if(!r)return a.pathname;const s=a.pathname.lastIndexOf("/"+r);return s>=0?a.pathname.slice(0,s):a.pathname}),[a.pathname,r]),i=o.useRef({isOpen:e,locationState:a.state,basePath:I,pathname:a.pathname,search:a.search});i.current.isOpen=e,i.current.locationState=a.state,i.current.basePath=I,i.current.pathname=a.pathname,i.current.search=a.search;const y=o.useCallback(((s,m)=>{p(`${i.current.basePath}/${s}`,{replace:m?.replace??!1,state:m?.extraState!=null?{...i.current.locationState,...m.extraState}:i.current.locationState})}),[p]),d=o.useCallback((()=>{i.current.isOpen&&p(i.current.basePath,{replace:!0,state:i.current.locationState})}),[p]),C=o.useCallback((()=>{const s=new URLSearchParams(i.current.search);s.set("view","full"),p(`${i.current.pathname}?${s.toString()}`,{replace:!0,state:i.current.locationState})}),[p]);return o.useEffect((()=>{if(!e)return;const s=m=>{if(m.key==="Escape"){if(m.target?.closest('[role="dialog"], [role="alertdialog"]'))return;if(!c&&(document.activeElement instanceof HTMLInputElement||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLSelectElement))return void document.activeElement.blur();d()}};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)}),[e,c,d]),{backToList:d,basePath:I,closePanel:d,isFullView:c,isMobile:u,isOpen:e,matchGroups:E,maximize:C,navigateToChild:y}}function Y(t){try{return decodeURIComponent(t)}catch{return t}}const Ae=/^transaction\/([^/]+)\/([^/?]+)$/;function Re(t){return function(n){const T=n.displayName??n.name??"Component",p=Q.memo(n),P=a=>{const{useFeatureGate:b}=O(),{isFeatureEnabled:u}=b(t.gateName??S.isTransactionDetailSplitViewEnabled),r=t.usePanelSetup(t.gateName==null||u),f=o.useContext(U),e=o.useMemo((()=>r.selectedItemId==null?f:{closePanel:r.sidePanel.closePanel,maximize:r.sidePanel.maximize,selectedItemId:r.selectedItemId}),[f,r.sidePanel.closePanel,r.sidePanel.maximize,r.selectedItemId]);return l.jsx(U.Provider,{value:e,children:l.jsx(p,{...a,...r.injectedProps})})};return P.displayName=`${t.displayNamePrefix}(${T})`,P}}const Ye=Re({displayNamePrefix:"withTransactionSidePanel",gateName:S.isTransactionDetailSplitViewEnabled,usePanelSetup:function(t){const n=(function(a=!0){const b=F(),u=k(),r=we(),f=j(),e=Me({childPathPattern:Ae,enabled:a}),v=e.matchGroups[0]!=null&&e.matchGroups[0]!==""?$e(Y(e.matchGroups[0])):void 0,c=e.matchGroups[1]!=null&&e.matchGroups[1]!==""?Y(e.matchGroups[1]):void 0,h=o.useMemo((()=>{if(a&&c!=null&&v!=null)return{id:c,type:v}}),[a,c,v]),E=Oe((s=>{if(h!=null)return Fe(s,h)})),I=o.useMemo((()=>e.isOpen&&h!=null?E==null?"In-Progress":E.fetchState:"Not-Started"),[e.isOpen,h,E]),i=f.tenantEmailDomain??u.pathname.split("/").find(Boolean)??"";o.useEffect((()=>{e.isOpen&&h!=null&&r(ke(h,!1))}),[r,e.isOpen,h]);const y=o.useRef({isOpen:e.isOpen,transactionId:c});y.current={isOpen:e.isOpen,transactionId:c};const d=o.useCallback((s=>{const m=encodeURIComponent(s.type);return e.isMobile||!a?`/${i}/transaction/${m}/${s.id}${u.search}`:`${e.basePath}/transaction/${m}/${s.id}${u.search}`}),[e.isMobile,e.basePath,a,i,u.search]);ge({currentTransactionId:h,enabled:i!=="",buildPath:d,navigate:b,navigateState:u.state});const C=o.useCallback(((s,m,g)=>{!e.isMobile&&a?y.current.isOpen&&y.current.transactionId===s?e.closePanel():e.navigateToChild(`transaction/${encodeURIComponent(m)}/${s}`,{replace:y.current.isOpen,extraState:g!=null?{searchContext:g}:void 0}):b(`/${i}/transaction/${encodeURIComponent(m)}/${s}`)}),[b,e.isMobile,e.navigateToChild,e.closePanel,a,i]);return{backToList:e.closePanel,closePanel:e.closePanel,fetchState:I,isFullView:e.isFullView,isOpen:e.isOpen,maximize:e.maximize,openPanel:C,selectedTransactionId:a?h:void 0,transactionDetail:a?E:void 0,transactionId:a?c:void 0,transactionType:a?v:void 0}})(t),{useFeatureGate:T}=O(),{isFeatureEnabled:p}=T(S.isTransactionCommentingEnabled),P=o.useMemo((()=>{if(n.isOpen&&n.transactionId!=null&&n.transactionType!=null)return l.jsx(De,{isFullView:n.isFullView,isTransactionCommentingEnabled:p,transactionId:n.transactionId,transactionType:n.transactionType,onBackToList:n.closePanel,onClose:n.closePanel})}),[n.isOpen,n.isFullView,n.transactionId,n.transactionType,n.closePanel,p]);return{injectedProps:o.useMemo((()=>t?{closeSidePanel:n.closePanel,openTransactionPanel:n.openPanel,panelContent:P,sidePanelIsFullView:n.isFullView,sidePanelIsOpen:n.isOpen}:{}),[t,n.closePanel,n.openPanel,P,n.isFullView,n.isOpen]),selectedItemId:n.transactionId,sidePanel:n}}});export{Re as a,Me as u,Ye as w};
|