@zeniai/web-components 4.3.5 → 4.3.6
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/{SessionTimeoutPopup-jT9LepdQ.js → SessionTimeoutPopup-Cg_XSaZP.js} +60790 -60421
- package/dist/{SessionTimeoutPopup-BHfeTilp.cjs → SessionTimeoutPopup-DdPzprdn.cjs} +15016 -14911
- package/dist/appLocale.d.ts +17 -0
- package/dist/cockpit.cjs.js +210 -205
- package/dist/cockpit.esm.js +4193 -4183
- package/dist/components/commentsAndNotes/components/StickyThread.d.ts +4 -1
- package/dist/components/commentsAndNotes/utils/useThreadPopupPlacement.d.ts +2 -2
- package/dist/components/invoicing/dunningDetail/InvoicingDunningDetailPage.d.ts +2 -1
- package/dist/components/invoicing/dunningDetail/InvoicingDunningEmailComposerDialog.d.ts +25 -0
- package/dist/components/taskManagement/taskManagementHeaderItemsData.d.ts +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +279 -278
- package/dist/strings/strings.d.ts +17 -0
- package/package.json +1 -1
package/dist/cockpit.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./SessionTimeoutPopup-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./SessionTimeoutPopup-DdPzprdn.cjs"),o=require("./vendor-.pnpm-Bks7atPv.cjs"),u=require("react"),s=require("@emotion/styled"),Xe=require("@liveblocks/react"),ee=require("@zeniai/client-epic-state"),ws=require("@liveblocks/react-ui"),ve=require("@emotion/react"),Po=require("react-dom"),St=require("@liveblocks/react-ui/primitives"),yi=require("@liveblocks/react/suspense");function Pa(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const ae=Pa(u),Ia=({inboxNotification:e,onNotificationClick:n})=>{const r=Xe.useInboxNotificationThread(e.id),i=r.metadata.entityType.split("."),a=r.metadata.isGlobalComment&&i.length===2;return o.jsxRuntimeExports.jsx(La,{isClickable:a,isUnRead:e.readAt==null,onClick:()=>{n(r.metadata,r.id)},children:o.jsxRuntimeExports.jsx(ws.InboxNotification,{inboxNotification:e,kinds:{thread:d=>o.jsxRuntimeExports.jsx(ws.InboxNotification.Thread,{...d,showRoomName:!0})}})})},La=s.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
cursor: ${e=>e.isClickable?"pointer":"initial"};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
&:hover {
|
|
15
15
|
border: 1px solid ${e=>e.theme.colors.grey1};
|
|
16
16
|
}
|
|
17
|
-
`,{common:{headers:{notifications:Aa}},commentsAndNotifications:{notifications:{texts:Da}},timeFormat:{hmmADashDDMMMCommaYYYY:ks}}=t.appLocale.getLocalizedStrings(),Oa=e=>{const{inboxNotifications:n,isLoading:r,isFetchingMore:i,hasFetchedAll:a,fetchMore:d}=Xe.useInboxNotifications();u.useEffect(()=>{const y=setTimeout(()=>d?.(),0);return()=>clearTimeout(y)});const l=r||i===!0||a!==!0,c=Xe.useMarkInboxNotificationAsRead(),[p,m]=u.useState(!1),{isDrawerOpen:x,application:g,onNotificationClick:h,onCloseAllInboxNotificationsDrawer:C}=e,b=u.useMemo(()=>{if(!n)return[];const y=[...n];return y.sort((j,f)=>{const E=
|
|
17
|
+
`,{common:{headers:{notifications:Aa}},commentsAndNotifications:{notifications:{texts:Da}},timeFormat:{hmmADashDDMMMCommaYYYY:ks}}=t.appLocale.getLocalizedStrings(),Oa=e=>{const{inboxNotifications:n,isLoading:r,isFetchingMore:i,hasFetchedAll:a,fetchMore:d}=Xe.useInboxNotifications();u.useEffect(()=>{const y=setTimeout(()=>d?.(),0);return()=>clearTimeout(y)});const l=r||i===!0||a!==!0,c=Xe.useMarkInboxNotificationAsRead(),[p,m]=u.useState(!1),{isDrawerOpen:x,application:g,onNotificationClick:h,onCloseAllInboxNotificationsDrawer:C}=e,b=u.useMemo(()=>{if(!n)return[];const y=[...n];return y.sort((j,f)=>{const E=ee.zeniDate(j.notifiedAt.toDateString(),ks),$=ee.zeniDate(f.notifiedAt.toDateString(),ks);return E.isSame($,"day")?0:E.isSameOrBefore($,"day")?-1:1}),y.filter(j=>j.roomId?.includes(g)===!0&&j.kind==="thread")},[g,n]),S=u.useCallback(()=>{m(!0);const y=b.filter(j=>j.readAt==null);y.length===0?m(!1):y.forEach((j,f)=>{c(j.id),f===y.length-1&&setTimeout(()=>{m(!1)},1e3)})},[c,b]);return o.jsxRuntimeExports.jsx(o.Drawer,{anchor:"right",open:x,style:{display:"flex",justifyContent:"space-between"},onClose:C,transitionDuration:250,children:o.jsxRuntimeExports.jsx(Na,{children:o.jsxRuntimeExports.jsxs(Ma,{children:[o.jsxRuntimeExports.jsxs(_a,{children:[o.jsxRuntimeExports.jsx(Ua,{}),o.jsxRuntimeExports.jsx(Ka,{onClick:C,children:o.jsxRuntimeExports.jsx(Ga,{})})]}),o.jsxRuntimeExports.jsxs(za,{children:[o.jsxRuntimeExports.jsxs(Va,{children:[o.jsxRuntimeExports.jsx(Ha,{children:Aa}),o.jsxRuntimeExports.jsx(Fa,{variant:"ghost",size:"small",label:Da.markAllAsRead,onClick:S,prefixIcon:l||p?o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"Small",start:!0}):o.jsxRuntimeExports.jsx(Ba,{className:"mark-as-read"}),disabled:l||p,textStyle:{...t.textStyles.standardRegular.cssObject},style:{borderRadius:t.Space.sp1,border:"none",backgroundColor:"transparent",flexShrink:0,padding:t.Space.sp0,cursor:l||p?"default":"pointer"}})]}),r===!0?o.jsxRuntimeExports.jsx(Ya,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"Standard",style:{color:"inherit"},start:!0})}):o.jsxRuntimeExports.jsx(Wa,{children:b.map(y=>o.jsxRuntimeExports.jsx(Ia,{inboxNotification:y,onNotificationClick:(j,f)=>h(j,f)},y.id))})]})]})})})},Na=s.div`
|
|
18
18
|
height: 100%; // Drawer header height
|
|
19
19
|
`,Ma=s.div`
|
|
20
20
|
width: 400px;
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
justify-content: center;
|
|
122
122
|
align-items: center;
|
|
123
123
|
background-color: inherit;
|
|
124
|
-
`;function Za(e){if(e.tabsFileType!=null)return{locale_id:t.appLocale.getAppLocaleID(),tabs_file_type:e.tabsFileType,tabs:e.tabs,filter_by_tabs:e.filterByTabs,time_zone:e.timezone}}function Xa(e){const{tabs:n,filterByTabs:r,tabsFileType:i,timezone:a}=e.defaultOptions;return{tabsFileType:i,tabs:n,filterByTabs:r,timezone:a}}function qa(e){const n=Xa(e);return Qa(e.downloadParams.cockpitEndPoint,e.downloadParams.authParams,n)}async function Qa(e,n,r){const i=`${e}?query=${encodeURIComponent(JSON.stringify(Za(r)))}`,{cockpit:a,download:d}=t.appLocale.getLocalizedStrings();try{if(r.tabsFileType==null)throw new Error(d.errorMessages.unsupportedFileType);const l=await t.fetchRequest({urlEndPoint:i,authParams:n,fileType:r.tabsFileType});if(l.ok){const c=t.getFileNameFromResponseHeaders(l.headers,a.defaultFileName),p=await l.arrayBuffer();o.fileDownload(p,c)}else console.error(`${d.errorMessages.fileDownloadError.replace("__feature__",a.cockpitHeader)} ${l.statusText}`)}catch(l){console.error(`${d.errorMessages.fileDownloadError.replace("__feature__",a.cockpitHeader)} ${JSON.stringify(l)}`)}}const
|
|
124
|
+
`;function Za(e){if(e.tabsFileType!=null)return{locale_id:t.appLocale.getAppLocaleID(),tabs_file_type:e.tabsFileType,tabs:e.tabs,filter_by_tabs:e.filterByTabs,time_zone:e.timezone}}function Xa(e){const{tabs:n,filterByTabs:r,tabsFileType:i,timezone:a}=e.defaultOptions;return{tabsFileType:i,tabs:n,filterByTabs:r,timezone:a}}function qa(e){const n=Xa(e);return Qa(e.downloadParams.cockpitEndPoint,e.downloadParams.authParams,n)}async function Qa(e,n,r){const i=`${e}?query=${encodeURIComponent(JSON.stringify(Za(r)))}`,{cockpit:a,download:d}=t.appLocale.getLocalizedStrings();try{if(r.tabsFileType==null)throw new Error(d.errorMessages.unsupportedFileType);const l=await t.fetchRequest({urlEndPoint:i,authParams:n,fileType:r.tabsFileType});if(l.ok){const c=t.getFileNameFromResponseHeaders(l.headers,a.defaultFileName),p=await l.arrayBuffer();o.fileDownload(p,c)}else console.error(`${d.errorMessages.fileDownloadError.replace("__feature__",a.cockpitHeader)} ${l.statusText}`)}catch(l){console.error(`${d.errorMessages.fileDownloadError.replace("__feature__",a.cockpitHeader)} ${JSON.stringify(l)}`)}}const Le=88,Ft=58,Bt=1,Wt=55,Ja=10,el=5,it=["management","subscription","portfolio","onboarding","audit","healthMonitor","taskManager","aiAccountant"],tl=[...it,"creditAgent"],fi=[{value:"controllerUserIds",multiple:!0,type:"user"},{value:"customerSuccessManagerUserIds",multiple:!0,type:"user"},{value:"preparerUserIds",multiple:!0,type:"user"},{value:"reviewerUserIds",multiple:!0,type:"user"},{value:"apAnalystUserIds",multiple:!0,type:"user"},{value:"taxLeadUserIds",multiple:!0,type:"user"},{value:"plans",multiple:!0},{value:"companyGroupId"},{value:"taxStatusCode"},{value:"statusCode"},{value:"annualRecurringRevenue"},{value:"monthlyRecurringRevenue"},{value:"customerSatisfaction",type:"rating"},{value:"zeniSatisfaction",type:"rating"}],Ci=[{value:"controllerUserIds",multiple:!0,type:"user"},{value:"statusCode"},{value:"recommendedActionCode"},{value:"monthlyRecurringRevenue"},{value:"subscriptionPlans",multiple:!0},{value:"subscriptionAddOns",multiple:!0},{value:"avg2MonthExpenses"},{value:"slabLowerLimit"},{value:"slabUpperLimit"}],ji=[{value:"netBurnOrIncome"},{value:"cashPosition"},{value:"expenses"},{value:"income"},{value:"runway",type:"runway"}],bi=[{value:"controller",multiple:!0,type:"user"},{value:"customerSuccessManager",multiple:!0,type:"user"},{value:"churnProbabilityPercentage",type:"dropdownRange"},{value:"runway",type:"runway"},{value:"netPromoterScore",type:"dropdownRange"},{value:"customerSatisfactionScore",type:"dropdownRange"},{value:"lastReportSent",type:"dateRange"},{value:"subscriptionRenewalDate",type:"dateRange"},{value:"subscriptionStartDate",type:"dateRange"},{value:"verticalProductServices"},{value:"monthlyRecurringRevenue"},{value:"companyGroupId"},{value:"externalProductServiceExposure"},{value:"companyEngagementMetricsUpdatedAt",type:"dateRange"}],ol=[{label:"< 200K",value:"0<->200000"},{label:"75K to 100K",value:"75000<->100000"},{label:"25K to 75K",value:"25000<->75000"},{label:"< 25K",value:"0<->25000"}],Ss=[{label:"< 10K",value:"0<->10000"},{label:"5K to 8K",value:"5000<->8000"},{label:"2K to 5K",value:"2000<->5000"},{label:"< 2K",value:"0<->2000"}],nl=[{label:"< 60K",value:"0<->60000"},{label:"60K to 200K",value:"60000<->200000"},{label:"200K to 500K",value:"200000<->500000"},{label:"500K to 800K",value:"500000<->800000"},{label:"800K to 1M",value:"800000<->1000000"},{label:"> 1M",value:"1000000-10000000000"}],sl=[{label:"< 100K",value:"0<->100000"},{label:"100K to 500K",value:"100000<->500000"},{label:"500K to 1M",value:"500000<->1000000"},{label:"> 1M",value:"1000000<->10000000000"}],rl=[{label:"< -500K",value:"-10000000000<->-500000"},{label:"-500K to -100K",value:"-500000<->-100000"},{label:"-100K to 0",value:"-100000<->0"},{label:"0 to 100K",value:"0<->100000"},{label:"> 100K",value:"100000<->10000000000"}],il=[{label:"< 10K",value:"-10000000000<->10000"},{label:"10K to 100K",value:"10000<->100000"},{label:"100K to 500K",value:"100000<->500000"},{label:"500K to 2M",value:"500000<->2000000"},{label:"2M to 5M",value:"2000000<->5000000"},{label:"5M to 25M",value:"5000000<->25000000"},{label:"> 25M",value:"25000000<->10000000000"}],al=[{label:"< 10K",value:"0<->10000"},{label:"10K to 50K",value:"10000<->50000"},{label:"50K to 100K",value:"50000<->100000"},{label:"100K to 300K",value:"100000<->300000"},{label:"300K to 500K",value:"300000<->500000"},{label:"500K to 1M",value:"500000<->1000000"},{label:"> 1M",value:"1000000<->10000000000"}],ll=[{label:"< 5K",value:"-10000000000<->5000"},{label:"5K to 25K",value:"5000<->25000"},{label:"25K to 100K",value:"25000<->100000"},{label:"100K to 500K",value:"100000<->500000"},{label:"> 500K",value:"500000<->10000000000"}],cl=[{label:"<= 3 months",value:"0<->3",iconColor:t.Colors.runwayRed},{label:"<= 1 year",value:"4<->12",iconColor:t.Colors.runwayYellow},{label:"> 1 year",value:"13<->1000000",iconColor:t.Colors.runwayGreen}],dl=[{label:"ZBP",value:"billpay"},{label:"ZA",value:"accounts"},{label:"ZR",value:"reimbursement"},{label:"ZC",value:"cards"},{label:"Tax",value:"zeni_tax_plan"},{label:"Payroll",value:"payroll_manager_service_plan"},{label:"CFO",value:"cfo_plan"}],pl=[{label:"0",value:"0"},{label:"10",value:"10"},{label:"20",value:"20"},{label:"30",value:"30"},{label:"40",value:"40"},{label:"50",value:"50"},{label:"60",value:"60"},{label:"70",value:"70"},{label:"80",value:"80"},{label:"90",value:"90"},{label:"100",value:"100"}],ul=[{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"5",value:"5"},{label:"6",value:"6"},{label:"7",value:"7"},{label:"8",value:"8"},{label:"9",value:"9"},{label:"10",value:"10"}],ml=[{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"5",value:"5"}],xl=[{label:"<= 1 month",value:"0<->1"},{label:"1 to 3 months",value:"1<->3"},{label:"3 to 6 months",value:"3<->6"},{label:"6 to 12 months",value:"6<->12"},{label:"1 to 5 years",value:"12<->60"},{label:"5 to 10 years",value:"60<->120"},{label:"> 10 year",value:"121<->1000000"}],Ri=[1,2,3,4,5,6,7,8,9,10],$i=[1,2,3,4,5],hl=e=>{const{cockpit:{titles:n}}=t.appLocale.getLocalizedStrings();switch(e){case"management":case"subscription":case"portfolio":case"onboarding":case"audit":return e;case"aiAccountant":return n.aiAccountant;case"creditAgent":return n.creditAgent;default:return n.healthMonitor}},gl=e=>{switch(e){case"management":return"Cockpit - Management";case"subscription":return"Cockpit - Subscription";case"portfolio":return"Cockpit - Portfolio";case"onboarding":return"Cockpit - Onboarding";case"audit":return"Cockpit - Audit";case"aiAccountant":return"Cockpit - AI Accountant";case"creditAgent":return"Cockpit - Credit Agent";default:return"Cockpit - Health Monitor"}},Sl=[{value:"enrollmentStatus",multiple:!0}],Ei=[{value:"company_id",multiple:!0},{value:"status",multiple:!0},{value:"priority",multiple:!0},{value:"assignees",multiple:!0,type:"user"},{value:"tag",multiple:!0},{value:"dueDate",type:"dateRange"},{value:"creationDate",type:"dateRange"}],yl=({downloadCockpitOptions:e})=>o.jsxRuntimeExports.jsx(t.SimpleDownloadMenuButton,{downloadMenuItems:e.downloadMenu.simpleMenuItems,onDownloadClick:e.downloadMenu.onDownloadClick});function fl(e){const[n,r]=u.useState(!1),{analytics:i,updateDownloadStateHandler:a,downloadState:d,currentCockpitTab:l}=e;return u.useEffect(()=>{async function c(){await qa({...e}),a("Completed"),i.trackDownload(gl(l),"months","excel",!1)}n&&e.downloadState!=="In-Progress"&&(r(!1),a("In-Progress"),c())},[d,n,a,i,e,l]),o.jsxRuntimeExports.jsx(Cl,{"data-testid":t.generateDataTestId("cockpit-download-button"),children:o.jsxRuntimeExports.jsx(yl,{downloadCockpitOptions:{type:"simple_menu",downloadMenu:{simpleMenuItems:[{type:"excel",isDownloading:e.downloadState==="In-Progress"}],onDownloadClick:async c=>{if(c==="excel"){if(e.downloadState==="In-Progress")return;r(!0)}}}}})})}const Cl=s.div``,Ts=s.div`
|
|
125
125
|
width: 100%;
|
|
126
126
|
flex-direction: column;
|
|
127
127
|
display: flex;
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
height: ${t.Space.sp3};
|
|
191
191
|
align-items: center;
|
|
192
192
|
justify-content: center;
|
|
193
|
-
`,kl=s.div``,{cockpit:yn,common:Tl}=t.appLocale.getLocalizedStrings();function Pl({defaultOptions:e,downloadState:n,downloadParams:r,signedInUser:i,cockpitHeader:a,analytics:d,currentTab:l,updateDownloadStateHandler:c,onZeniLogoClick:p,onLogOutClick:m,onThreadClick:x,onNotificationClick:g,onNewCustomerClick:h}){const C=t.useWindowSizeContext(),[b,S]=u.useState(!1),[y,j]=u.useState(!1),{inboxNotifications:f,isLoading:E,isFetchingMore:$,hasFetchedAll:A,fetchMore:I}=Xe.useInboxNotifications(),{threads:
|
|
193
|
+
`,kl=s.div``,{cockpit:yn,common:Tl}=t.appLocale.getLocalizedStrings();function Pl({defaultOptions:e,downloadState:n,downloadParams:r,signedInUser:i,cockpitHeader:a,analytics:d,currentTab:l,updateDownloadStateHandler:c,onZeniLogoClick:p,onLogOutClick:m,onThreadClick:x,onNotificationClick:g,onNewCustomerClick:h}){const C=t.useWindowSizeContext(),[b,S]=u.useState(!1),[y,j]=u.useState(!1),{inboxNotifications:f,isLoading:E,isFetchingMore:$,hasFetchedAll:A,fetchMore:I}=Xe.useInboxNotifications(),{threads:w,isLoading:k}=t.useFilteredThreads({application:"cockpit",isGlobalComment:!0},"both",!0),D=u.useMemo(()=>w.filter(v=>v.resolved===!1),[w]).length,{setOpenThread:G,setRequestToOpenThread:O,openThread:Z}=u.useContext(t.ThreadsContext);u.useEffect(()=>{const v=setTimeout(()=>I?.(),0);return()=>clearTimeout(v)});const q=E||$===!0||A!==!0,R=f?.filter(v=>v.readAt==null&&v.roomId?.includes("cockpit")===!0&&v.kind==="thread").length,T=hl(l),V=u.useCallback((v,L)=>{const{companyId:J,entityType:re}=v;Z===L?G(null):(S(!1),O({threadId:L,companyId:J,entityType:re}))},[Z,G,O]),W=u.useCallback((v,L)=>{const{companyId:J,entityType:re}=v;Z===L?G(null):(j(!1),O({threadId:L,companyId:J,entityType:re}))},[Z,G,O]);return C!=="small"?o.jsxRuntimeExports.jsxs(Ts,{children:[o.jsxRuntimeExports.jsxs(Ps,{children:[o.jsxRuntimeExports.jsx($l,{children:o.jsxRuntimeExports.jsx(Rl,{"data-testid":t.generateDataTestId("zeni-logo-cockpit-nav-bar"),onClick:p})}),o.jsxRuntimeExports.jsx(jl,{children:a??yn.cockpitHeader}),o.jsxRuntimeExports.jsxs(El,{children:[b?null:o.jsxRuntimeExports.jsxs(Is,{isDisabled:k,onClick:k?()=>null:()=>S(!0),children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:k?void 0:D,isLoading:k,style:{left:"12px"}}),o.jsxRuntimeExports.jsx(vl,{})]}),o.jsxRuntimeExports.jsxs(Is,{isDisabled:q,onClick:q?()=>null:()=>j(!0),children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:R,isLoading:q,style:{left:"12px"}}),o.jsxRuntimeExports.jsx(wl,{})]}),o.jsxRuntimeExports.jsx(fl,{defaultOptions:e,downloadParams:r,downloadState:n,analytics:d,currentCockpitTab:T,updateDownloadStateHandler:c}),o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:yn.newCustomer,onClick:h}),o.jsxRuntimeExports.jsx(bl,{children:o.jsxRuntimeExports.jsx(t.LogoutButton,{signedInUser:i,pageName:"Cockpit",onLogOutClick:m})})]})]}),o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:b,filter:{application:"cockpit",isGlobalComment:!0},autoExpand:!0,autoFocus:!1,drawerTitle:Tl.headers.comments,onCloseAllThreadsDrawer:()=>S(!1),onThreadClick:(v,L)=>{x(v,L,V)},style:{cursor:"pointer"},showReactions:!0,showActions:!0,allowExpand:!0,threads:w,isLoading:k,allowComposer:!1,textOverrides:{},withRoomProvider:!0}),o.jsxRuntimeExports.jsx(Oa,{application:"cockpit",isDrawerOpen:y,onNotificationClick:(v,L)=>{g(v,L,W)},onCloseAllInboxNotificationsDrawer:()=>j(!1)})]}):o.jsxRuntimeExports.jsx(Ts,{className:"mobileHeader",children:o.jsxRuntimeExports.jsxs(Ps,{className:"mobileTitle",children:[o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:yn.newCustomer,onClick:h}),o.jsxRuntimeExports.jsx(kl,{children:o.jsxRuntimeExports.jsx(t.LogoutButton,{signedInUser:i,pageName:"Cockpit",onLogOutClick:m})})]})})}const ys=["management","subscription","portfolio","onboarding","audit","healthMonitor","taskManager","aiAccountant","creditAgent"],Rt=e=>ee.stringToUnion(e,ys),Il=e=>ee.stringToUnionStrict(e,ys),Ll=(e,n)=>e in n,vi=e=>{switch(e){case"management":return fi;case"subscription":return Ci;case"portfolio":return ji;case"healthMonitor":return bi;case"aiAccountant":return Sl;case"taskManager":return Ei;default:return[]}},as=(e,n)=>{const{cockpit:{filters:{filterCategories:r}}}=t.appLocale.getLocalizedStrings();switch(e){case"management":return r.management[n];case"portfolio":return r.portfolio[n];case"subscription":return r.subscription[n];case"aiAccountant":return r.aiAccountant[n];case"taskManager":return r.taskManager[n];default:return r.healthMonitor[n]}},Al=s.div`
|
|
194
194
|
display: flex;
|
|
195
195
|
justify-content: space-between;
|
|
196
196
|
align-items: center;
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
`,ql=s(t.StandardRegularSp)`
|
|
263
263
|
overflow: hidden;
|
|
264
264
|
text-overflow: ellipsis;
|
|
265
|
-
`,Ql=({options:e,categoryIndex:n,value:r,categoryType:i,categoryLabel:a,valuesCombinationOperator:d,showAnyAll:l,onChange:c,onValuesCombinationOperatorChange:p})=>{const m=o.useTheme(),x=t.getMultiSelectDropdownStyles(m),{common:{filters:g,texts:h},cockpit:{userProfileAltText:C}}=t.appLocale.getLocalizedStrings(),b=r.map(
|
|
265
|
+
`,Ql=({options:e,categoryIndex:n,value:r,categoryType:i,categoryLabel:a,valuesCombinationOperator:d,showAnyAll:l,onChange:c,onValuesCombinationOperatorChange:p})=>{const m=o.useTheme(),x=t.getMultiSelectDropdownStyles(m),{common:{filters:g,texts:h},cockpit:{userProfileAltText:C}}=t.appLocale.getLocalizedStrings(),b=r.map(k=>e.find(N=>N.value===k)),S=(k,N,D,G)=>i!=="user"?null:k==null?o.jsxRuntimeExports.jsx(t.EntityAvatarWithInitials,{firstName:N,lastName:D,index:G}):o.jsxRuntimeExports.jsx(Gl,{src:k.href,alt:C,onError:({currentTarget:O})=>{O.onerror=null,O.src=t.AvatarSVG},loading:"lazy"}),y=k=>i!=="rating"?null:Object.keys(eo).includes(k)?o.jsxRuntimeExports.jsx(ln,{iconName:eo[k].iconName,width:18,height:18,stopAnimation:!0,style:{margin:0}}):o.jsxRuntimeExports.jsx(ln,{iconName:To[k].iconName,stopAnimation:!0,width:18,height:18,style:{margin:0}}),j=k=>i!=="runway"?null:o.jsxRuntimeExports.jsx(Wl,{color:k}),f=k=>{const N=e.findIndex(D=>D.value===k.data.value);return o.jsxRuntimeExports.jsx(o.components.MultiValueLabel,{...k,children:o.jsxRuntimeExports.jsxs(Ul,{children:[S(k.data.photo,k.data.label.split(" ")[0],k.data.label.split(" ")[1]!=null?k.data.label.split(" ")[1]:"",N),y(k.data.value),j(k.data.iconColor),o.jsxRuntimeExports.jsx(ql,{children:k.children})]})})},E=k=>o.jsxRuntimeExports.jsx(o.components.MultiValueRemove,{...k,children:o.jsxRuntimeExports.jsx(Xl,{})}),$=k=>{const{onMouseMove:N,onMouseOver:D,isSelected:G,...O}=k.innerProps,Z=e.findIndex(R=>R.value===k.data.value),q={...k,innerProps:O};return o.jsxRuntimeExports.jsx(o.components.Option,{...q,children:o.jsxRuntimeExports.jsxs(Kl,{children:[o.jsxRuntimeExports.jsxs(Hl,{children:[S(k.data.photo,k.data.label.split(" ")[0],k.data.label.split(" ")[1]!=null?k.data.label.split(" ")[1]:"",Z),y(k.data.value),j(k.data.iconColor),o.jsxRuntimeExports.jsx(t.StandardRegular,{children:k.label})]}),k.isSelected&&o.jsxRuntimeExports.jsx(Yl,{})]})})},A=(k,N)=>i==="user"&&k.data.email!=null?k.data.label.toLowerCase().includes(N.toLowerCase())||k.data.email.toLowerCase().includes(N.toLowerCase()):k.data.label.toLowerCase().includes(N.toLowerCase()),I=l&&b.length>1,w=()=>{switch(i){case"dateRange":return o.jsxRuntimeExports.jsx(ec,{"data-testid":t.generateDataTestId("cockpit-filters-values-daterange"),children:o.jsxRuntimeExports.jsx(t.DateRangeFilterField,{onDateRangeChange:k=>{k.startDate!=null&&k.endDate!=null&&c([{label:g.startDate,value:k.startDate},{label:g.endDate,value:k.endDate}],n)},selectedDates:r})});case"dropdownRange":return o.jsxRuntimeExports.jsx(tc,{"data-testid":t.generateDataTestId("cockpit-filters-values-numrange"),children:o.jsxRuntimeExports.jsx(Nl,{options:e.map(k=>parseInt(k.label)),onNumericRangeChange:k=>{k.start!=null&&k.end!=null&&c([{label:g.startDate,value:k.start.toString()},{label:g.endDate,value:k.end.toString()}],n)},selectedRanges:r!=null&&r.length>0?{start:parseInt(r[0].toString()),end:parseInt(r[1].toString())}:{start:void 0,end:void 0}})});default:return o.jsxRuntimeExports.jsxs(Vl,{"data-testid":t.generateDataTestId("cockpit-filters-values-select-container"),children:[b.length===0&&i==="user"?o.jsxRuntimeExports.jsx(Zl,{}):null,o.jsxRuntimeExports.jsx(o.StateManagedSelect$1,{isMulti:!0,hideSelectedOptions:!1,value:b,onChange:k=>{Array.isArray(k)===!0&&c(k,n)},placeholder:`${h.select} ${a}`,options:e,styles:x,menuPosition:"fixed",components:{Option:$,MultiValueLabel:f,MultiValueRemove:E},filterOption:A})]})}};return o.jsxRuntimeExports.jsxs(_l,{categoryType:i,"data-testid":t.generateDataTestId("cockpit-filters-values-wrapper"),children:[w(),I&&o.jsxRuntimeExports.jsx(Jl,{"data-testid":t.generateDataTestId("cockpit-filters-values-any-all"),children:o.jsxRuntimeExports.jsx(Fl,{categoryIndex:n,value:d,onChange:p})})]})},Jl=s.div``,ec=s.div``,tc=s.div``,Os=s.div`
|
|
266
266
|
display: flex;
|
|
267
267
|
flex-direction: column;
|
|
268
268
|
row-gap: ${t.Space.sp4};
|
|
@@ -328,9 +328,9 @@
|
|
|
328
328
|
column-gap: ${t.Space.sp3};
|
|
329
329
|
`,cc=s.div`
|
|
330
330
|
width: 315px;
|
|
331
|
-
${e=>e.categoryType!=="dropdownRange"?
|
|
331
|
+
${e=>e.categoryType!=="dropdownRange"?ve.css`
|
|
332
332
|
background: ${e.theme.colors.background};
|
|
333
|
-
`:
|
|
333
|
+
`:ve.css`
|
|
334
334
|
background: none;
|
|
335
335
|
`};
|
|
336
336
|
border-radius: ${t.Space.sp1};
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
display: flex;
|
|
339
339
|
align-items: center;
|
|
340
340
|
column-gap: ${t.Space.sp3};
|
|
341
|
-
`,dc=
|
|
341
|
+
`,dc=ve.keyframes`
|
|
342
342
|
0% {
|
|
343
343
|
opacity: 0;
|
|
344
344
|
}
|
|
@@ -350,14 +350,14 @@
|
|
|
350
350
|
align-items: flex-start;
|
|
351
351
|
column-gap: ${t.Space.sp3};
|
|
352
352
|
animation: ${dc} 0.4s;
|
|
353
|
-
`,wi=u.forwardRef(({filters:e,onFiltersChange:n,filterValues:r,selectedCockpitOption:i},a)=>{const d=u.useCallback((S,y)=>{const j=t.getUpdatedFiltersOnCategoryChange({currentFilters:e,selectedOption:S,categoryIndex:y});n(j)},[e,n]),l=u.useCallback((S,y)=>{const j=t.getUpdatedFiltersOnMatchingOperatorChange({currentFilters:e,selectedOption:S,categoryIndex:y});n(j)},[e,n]),c=u.useCallback((S,y)=>{if(e.categories==null)return;const j={...e,categories:e.categories.map((f,E)=>E!=y?f:{...f,valuesCombinationOperator:S.value})};n(j)},[e,n]),p=u.useCallback(S=>{if(e!=null){const y={...e,categoryCombinationOperator:S};n(y)}},[e,n]),m=u.useCallback(S=>{if(S===0&&e.categories!=null&&e.categories.length===1){n({});return}if(e.categories!=null){if([...e.categories.slice(0,S),...e.categories.slice(S+1)].filter(j=>j.field!=null).length){const j={...e,categories:[...e.categories.slice(0,S),...e.categories.slice(S+1)]};n(j);return}n({})}},[n,e]),x=()=>{e.categories!=null&&n({...e,categories:[...e.categories,{...t.NEW_CATEGORY_BODY}]})},g=()=>{n({})},h=u.useCallback((S,y)=>{const j=t.getUpdatedFiltersOnValueChange({currentFilters:e,selectedOptions:S,categoryIndex:y});n(j)},[e,n]),C=()=>e.categories!=null?o.jsxRuntimeExports.jsxs(rc,{children:[o.jsxRuntimeExports.jsxs(Fs,{onClick:x,"data-testid":t.generateDataTestId("cockpit-filters-add-button"),children:[o.jsxRuntimeExports.jsx(oc,{}),o.jsxRuntimeExports.jsx(t.StandardRegular,{children:t.appLocale.getLocalizedStrings().cockpit.filters.addFilterBtnText})]}),o.jsxRuntimeExports.jsxs(Fs,{onClick:g,"data-testid":t.generateDataTestId("cockpit-filters-clear-all-button"),children:[o.jsxRuntimeExports.jsx(nc,{}),o.jsxRuntimeExports.jsx(t.StandardRegular,{children:t.appLocale.getLocalizedStrings().cockpit.filters.clearAllBtnText})]})]}):null,b=()=>e.categories==null?o.jsxRuntimeExports.jsx(Os,{"data-testid":t.generateDataTestId("cockpit-filters-empty-state"),children:o.jsxRuntimeExports.jsx(Ns,{children:o.jsxRuntimeExports.jsxs(Ws,{children:[o.jsxRuntimeExports.jsx(Ms,{children:o.jsxRuntimeExports.jsx(Bs,{children:t.appLocale.getLocalizedStrings().cockpit.filters.filterByLabel})}),o.jsxRuntimeExports.jsx(zs,{children:o.jsxRuntimeExports.jsx(Ls,{defaultMenuIsOpen:!0,onChange:d,selectedCockpitOption:i})})]})})}):o.jsxRuntimeExports.jsx(u.Fragment,{children:e.categories.map((S,y)=>{const f=vi(i).find(
|
|
353
|
+
`,wi=u.forwardRef(({filters:e,onFiltersChange:n,filterValues:r,selectedCockpitOption:i},a)=>{const d=u.useCallback((S,y)=>{const j=t.getUpdatedFiltersOnCategoryChange({currentFilters:e,selectedOption:S,categoryIndex:y});n(j)},[e,n]),l=u.useCallback((S,y)=>{const j=t.getUpdatedFiltersOnMatchingOperatorChange({currentFilters:e,selectedOption:S,categoryIndex:y});n(j)},[e,n]),c=u.useCallback((S,y)=>{if(e.categories==null)return;const j={...e,categories:e.categories.map((f,E)=>E!=y?f:{...f,valuesCombinationOperator:S.value})};n(j)},[e,n]),p=u.useCallback(S=>{if(e!=null){const y={...e,categoryCombinationOperator:S};n(y)}},[e,n]),m=u.useCallback(S=>{if(S===0&&e.categories!=null&&e.categories.length===1){n({});return}if(e.categories!=null){if([...e.categories.slice(0,S),...e.categories.slice(S+1)].filter(j=>j.field!=null).length){const j={...e,categories:[...e.categories.slice(0,S),...e.categories.slice(S+1)]};n(j);return}n({})}},[n,e]),x=()=>{e.categories!=null&&n({...e,categories:[...e.categories,{...t.NEW_CATEGORY_BODY}]})},g=()=>{n({})},h=u.useCallback((S,y)=>{const j=t.getUpdatedFiltersOnValueChange({currentFilters:e,selectedOptions:S,categoryIndex:y});n(j)},[e,n]),C=()=>e.categories!=null?o.jsxRuntimeExports.jsxs(rc,{children:[o.jsxRuntimeExports.jsxs(Fs,{onClick:x,"data-testid":t.generateDataTestId("cockpit-filters-add-button"),children:[o.jsxRuntimeExports.jsx(oc,{}),o.jsxRuntimeExports.jsx(t.StandardRegular,{children:t.appLocale.getLocalizedStrings().cockpit.filters.addFilterBtnText})]}),o.jsxRuntimeExports.jsxs(Fs,{onClick:g,"data-testid":t.generateDataTestId("cockpit-filters-clear-all-button"),children:[o.jsxRuntimeExports.jsx(nc,{}),o.jsxRuntimeExports.jsx(t.StandardRegular,{children:t.appLocale.getLocalizedStrings().cockpit.filters.clearAllBtnText})]})]}):null,b=()=>e.categories==null?o.jsxRuntimeExports.jsx(Os,{"data-testid":t.generateDataTestId("cockpit-filters-empty-state"),children:o.jsxRuntimeExports.jsx(Ns,{children:o.jsxRuntimeExports.jsxs(Ws,{children:[o.jsxRuntimeExports.jsx(Ms,{children:o.jsxRuntimeExports.jsx(Bs,{children:t.appLocale.getLocalizedStrings().cockpit.filters.filterByLabel})}),o.jsxRuntimeExports.jsx(zs,{children:o.jsxRuntimeExports.jsx(Ls,{defaultMenuIsOpen:!0,onChange:d,selectedCockpitOption:i})})]})})}):o.jsxRuntimeExports.jsx(u.Fragment,{children:e.categories.map((S,y)=>{const f=vi(i).find(w=>w.value===S.field),E=f?.multiple,$=f?.type,A=f!=null?as(i,f?.value):"",I=S.field??`${y}`;return o.jsxRuntimeExports.jsxs(Ns,{"data-testid":t.generateDataTestId("cockpit-filters-row",I),children:[o.jsxRuntimeExports.jsxs(Ws,{children:[o.jsxRuntimeExports.jsxs(Ms,{children:[y===0&&o.jsxRuntimeExports.jsx(Bs,{children:t.appLocale.getLocalizedStrings().cockpit.filters.filterByLabel}),y!==0?o.jsxRuntimeExports.jsx(pc,{"data-testid":t.generateDataTestId("cockpit-filters-combination-operator",I),children:o.jsxRuntimeExports.jsx(t.CombinationOperatorButton,{categoryCombinationOperator:e.categoryCombinationOperator,onChange:p,buttonsDisabled:y>1})}):null]}),o.jsxRuntimeExports.jsx(zs,{"data-testid":t.generateDataTestId("cockpit-filters-category-dropdown",I),children:o.jsxRuntimeExports.jsx(Ls,{categoryIndex:y,value:S.field,onChange:d,selectedCockpitOption:i})})]}),S.field&&o.jsxRuntimeExports.jsxs(uc,{children:[o.jsxRuntimeExports.jsx(sc,{"data-testid":t.generateDataTestId("cockpit-filters-matching-operator",I),children:o.jsxRuntimeExports.jsx(t.MatchingOperatorDropdown,{categoryIndex:y,value:S.matchingOperator,onChange:l})}),o.jsxRuntimeExports.jsxs(lc,{children:[o.jsxRuntimeExports.jsx(cc,{categoryType:$,"data-testid":t.generateDataTestId("cockpit-filters-values-dropdown",I),children:o.jsxRuntimeExports.jsx(Ql,{options:r[S.field]!=null?r[S.field]:[],value:S.values,categoryIndex:y,categoryType:$,categoryLabel:A,showAnyAll:E??!1,onChange:h,valuesCombinationOperator:S.valuesCombinationOperator,onValuesCombinationOperatorChange:c})}),o.jsxRuntimeExports.jsx(ic,{onClick:()=>m(y),"data-testid":t.generateDataTestId("cockpit-filters-delete-row",I),children:o.jsxRuntimeExports.jsx(ac,{})})]})]})]},S.field?S.field+y:y)})});return o.jsxRuntimeExports.jsxs(Os,{ref:a,"data-testid":t.generateDataTestId("cockpit-filters-selection-container"),children:[b(),C()]})});wi.displayName="FiltersSelection";const mc=s.div`
|
|
354
354
|
padding: ${t.Space.sp4};
|
|
355
355
|
box-sizing: border-box;
|
|
356
356
|
height: ${e=>`${typeof e.height=="number"?e.height+"px":e.height}`};
|
|
357
357
|
background: ${e=>e.theme.colors.grey5};
|
|
358
358
|
max-height: 650px;
|
|
359
359
|
overflow: ${e=>e.height>"650"?"scroll":"visible"};
|
|
360
|
-
`,xc=({selectedCockpitOption:e,filters:n,disableFilters:r=!1,onFiltersChange:i,onSearchTextChanged:a,getCategoryWiseOptions:d,companiesLoaded:l=!0,filterText:c})=>{const p=u.useRef(null),[m,x]=u.useState(!1),g=u.useRef(!1),[h,C]=u.useState({management:{},portfolio:{},subscription:{},onboarding:{},audit:{},healthMonitor:{},taskManager:{},aiAccountant:{},creditAgent:{}}),[b,S]=u.useState(136),y=u.useRef(null),j=t.useWindowSizeContext(),f=u.useCallback(()=>{x(!1)},[]),E=u.useCallback(()=>{r===!1&&x(!0)},[r]);u.useEffect(()=>{d&&Object.keys(h[e]).length===0&&l&&C(
|
|
360
|
+
`,xc=({selectedCockpitOption:e,filters:n,disableFilters:r=!1,onFiltersChange:i,onSearchTextChanged:a,getCategoryWiseOptions:d,companiesLoaded:l=!0,filterText:c})=>{const p=u.useRef(null),[m,x]=u.useState(!1),g=u.useRef(!1),[h,C]=u.useState({management:{},portfolio:{},subscription:{},onboarding:{},audit:{},healthMonitor:{},taskManager:{},aiAccountant:{},creditAgent:{}}),[b,S]=u.useState(136),y=u.useRef(null),j=t.useWindowSizeContext(),f=u.useCallback(()=>{x(!1)},[]),E=u.useCallback(()=>{r===!1&&x(!0)},[r]);u.useEffect(()=>{d&&Object.keys(h[e]).length===0&&l&&C(w=>({...w,[e]:d()}))},[e,h,l]);const $=u.useCallback(()=>{if(n?.categories==null)return Le;const w=y.current,k=w!=null?w.clientHeight:0;return t.sp[7]+(k>0?k:Le)},[n]);u.useEffect(()=>{if(m!==g.current){S("auto");return}S($())},[$,m]),u.useEffect(()=>{g.current=m},[m]),u.useEffect(()=>{b==="auto"&&S($())},[b,$]);const A=()=>o.jsxRuntimeExports.jsx(t.FiltersPopover,{anchorEl:p.current,open:m,onClose:f,paperStyle:{overflow:"visible"},children:o.jsxRuntimeExports.jsx(mc,{height:b,windowSize:j,"data-testid":t.generateDataTestId("cockpit-filters-selection-wrapper"),children:n&&o.jsxRuntimeExports.jsx(gc,{"data-testid":t.generateDataTestId("cockpit-filters-selection"),children:o.jsxRuntimeExports.jsx(wi,{filters:n,onFiltersChange:i,filterValues:h[e],selectedCockpitOption:e,ref:y})})})},n?.categories==null||n.categories.length===0?"smallBox":"largeBox"),I=n?.categories==null||n.categories.length===0?0:n.categories.filter(w=>w.field!=null&&w.values.length>0).length;return o.jsxRuntimeExports.jsxs(u.Fragment,{children:[o.jsxRuntimeExports.jsx(hc,{"data-testid":t.generateDataTestId("cockpit-filters-search-box"),children:o.jsxRuntimeExports.jsx(t.SearchBoxWithFilterButton,{isFilterBtnActive:m||I>0,searchPlaceholder:t.appLocale.getLocalizedStrings().cockpit.searchplaceholder,ref:p,isFilterDisabled:r,onSearchTextChanged:a,onFilterButtonClick:E,filtersCount:I,filterText:c})}),r!=!0&&A()]})},hc=s.div``,gc=s.div``,{common:{numbers:Sc,strings:yc}}=t.appLocale.getLocalizedStrings(),fc=({onTabChange:e,allTabOptions:n,selectedOption:r,tabCounterDetails:i,getTitle:a})=>{const d=(c,p)=>{e(p)},l=c=>{let p=0;if(i?.forEach(m=>{m.tab===c&&(p=m.count)}),p!==0)return p<100?`${p}`:`${Sc.maximumCount}${yc.plus}`};return o.jsxRuntimeExports.jsx(jc,{"data-testid":t.generateDataTestId("cockpit-nav-switcher"),children:o.jsxRuntimeExports.jsx(Cc,{value:r,onChange:d,centered:!0,"data-testid":t.generateDataTestId("cockpit-nav-switcher-tabs"),children:n.map(c=>o.jsxRuntimeExports.jsx(bc,{count:l(c),label:a(c),disableRipple:!0,"data-testid":t.generateDataTestId("cockpit-nav-switcher-tab",c)},c))})})},Cc=s(o.Tabs)`
|
|
361
361
|
.MuiTabs-indicator {
|
|
362
362
|
background-color: ${e=>e.theme.colors.primary};
|
|
363
363
|
width: calc(100% - 20px);
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
height: ${t.Space.sp8};
|
|
442
442
|
color: ${e=>e.theme.colors.hero};
|
|
443
443
|
margin-bottom: ${t.Space.sp4};
|
|
444
|
-
`,$t=({selectedCockpitOption:e,reloadMsg:n,onCockpitReloadData:r})=>{const i=n??t.appLocale.getLocalizedStrings().card.failedText,a=t.useWindowSizeContext();return o.jsxRuntimeExports.jsxs(Ic,{onClick:()=>r(e),windowSize:a,"data-testid":t.generateDataTestId("cockpit-reload-container"),children:[o.jsxRuntimeExports.jsx(Ac,{"data-testid":t.generateDataTestId("cockpit-reload-icon")}),o.jsxRuntimeExports.jsx(Lc,{"data-testid":t.generateDataTestId("cockpit-reload-message"),children:i})]})},{common:{strings:{dot:_s}}}=t.appLocale.getLocalizedStrings(),
|
|
444
|
+
`,$t=({selectedCockpitOption:e,reloadMsg:n,onCockpitReloadData:r})=>{const i=n??t.appLocale.getLocalizedStrings().card.failedText,a=t.useWindowSizeContext();return o.jsxRuntimeExports.jsxs(Ic,{onClick:()=>r(e),windowSize:a,"data-testid":t.generateDataTestId("cockpit-reload-container"),children:[o.jsxRuntimeExports.jsx(Ac,{"data-testid":t.generateDataTestId("cockpit-reload-icon")}),o.jsxRuntimeExports.jsx(Lc,{"data-testid":t.generateDataTestId("cockpit-reload-message"),children:i})]})},{common:{strings:{dot:_s}}}=t.appLocale.getLocalizedStrings(),te="cockpitCommentsContainer",_t=(e,n,r,i,a)=>({companyName:i,companyId:r,entityId:a??r,entityType:`${e}.${n}`,isGlobalComment:!0,application:"cockpit",tab:e,url:window.location.href}),Pe=(e,n,r)=>`${t.toCollaborationEntityType({tab:e,key:n})}${_s}${r}${_s}${t.NEW_THREAD_SUFFIX}`,fs=(e,n)=>{for(;e&&!e.classList.contains(n);)e=e.parentElement;return e},Dc=({open:e,anchorEl:n,children:r,onClose:i})=>{const a=o.useTheme();return o.jsxRuntimeExports.jsx(o.Popover,{transitionDuration:0,anchorEl:n,open:e,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{style:{marginTop:"6px",background:a.colors.grey5,boxShadow:`${t.Space.sp0} 2px ${t.Space.sp1} ${a.colors.dropShadowNormal}`,width:"284px",padding:t.Space.sp1,border:`1px solid ${a.colors.grey3}`,borderRadius:t.Space.sp2}},"data-testid":t.generateDataTestId("cockpit-parent-subsidiary-popover"),onClose:i,children:r})},Oc=({companyId:e,companyName:n,parentInfo:r,subsidiaryInfo:i,onViewDetailsLinkClicked:a})=>{const d=r?r.subsidiaries:i?i.siblings:[],l=()=>d.map(m=>o.jsxRuntimeExports.jsx(Vs,{isHighlighted:!1,"data-testid":t.generateDataTestId("cockpit-parent-subsidiary-item",m.companyId),children:o.jsxRuntimeExports.jsx(Us,{children:m.name})},m.companyId)),c=i?i.parentCompanyId:e,p=r!=null?n:i?.parentCompanyName;return o.jsxRuntimeExports.jsxs(Mc,{"data-testid":t.generateDataTestId("cockpit-parent-subsidiary-content"),children:[o.jsxRuntimeExports.jsxs(zc,{isHighlighted:r!=null,children:[o.jsxRuntimeExports.jsx(Fc,{isHighlighted:r!=null,"data-testid":t.generateDataTestId("cockpit-parent-subsidiary-parent-name"),children:p}),o.jsxRuntimeExports.jsxs(Bc,{"data-testid":t.generateDataTestId("cockpit-parent-subsidiary-view-details"),onClick:()=>{a&&a(c)},children:[t.appLocale.getLocalizedStrings().cockpit.parentSubsidiary.viewDetailsLink,o.jsxRuntimeExports.jsx(Nc,{})]})]}),o.jsxRuntimeExports.jsxs(Wc,{"data-testid":t.generateDataTestId("cockpit-parent-subsidiary-list"),children:[i&&o.jsxRuntimeExports.jsx(Vs,{isHighlighted:!0,"data-testid":t.generateDataTestId("cockpit-parent-subsidiary-current-company"),children:o.jsxRuntimeExports.jsx(Us,{children:n})}),l()]})]})},Nc=s(t.SvgArrowRight)`
|
|
445
445
|
padding-left: ${t.Space.sp1};
|
|
446
446
|
transform: translateY(1px);
|
|
447
447
|
height: 10px;
|
|
@@ -524,7 +524,7 @@
|
|
|
524
524
|
align-items: center;
|
|
525
525
|
justify-content: flex-start;
|
|
526
526
|
width: 100%;
|
|
527
|
-
`;function Cs({allowedValues:e,pickerStyles:{optionBackgroundColor:n,backgroundColor:r,selectedOptionBackgroundColor:i,optionTextStyle:a,titleTextAlignment:d,selectedOptionColor:l,titleTextStyle:c}={},onSelectedValueChanged:p,selectedValue:m,customization:{placeholderLabel:x}={}}){const g=e.map($=>({...$.value,...$.options,label:$.value.name,value:
|
|
527
|
+
`;function Cs({allowedValues:e,pickerStyles:{optionBackgroundColor:n,backgroundColor:r,selectedOptionBackgroundColor:i,optionTextStyle:a,titleTextAlignment:d,selectedOptionColor:l,titleTextStyle:c}={},onSelectedValueChanged:p,selectedValue:m,customization:{placeholderLabel:x}={}}){const g=e.map($=>({...$.value,...$.options,label:$.value.name,value:ee.isAllowedValueWithCode($.value)?$.value.code:$.value.id})),h=g.find($=>$.name===m?.value.name),C=o.useTheme(),b=n??C.colors.grey5,S=r??C.colors.grey5,y=i??C.colors.grey3,j=a??t.textStyles.standardRegular.cssObject,f=c??t.textStyles.smallRegular.cssObject,E={control:($,{selectProps:A})=>({...$,border:0,height:"100%",backgroundColor:S,fill:A.menuIsOpen===!0?C.colors.primary:C.colors.grey1,boxShadow:S,":active":{backgroundColor:S},":hover":{fill:C.colors.primary},width:"auto",minHeight:"auto",cursor:"pointer"}),container:$=>({...$,backgroundColor:S,width:"100%",height:"100%"}),singleValue:($,{data:A})=>({...$,display:"flex",flexDirection:"row",alignItems:"center",padding:"1px 6px",margin:`${t.Space.sp0}`,height:"20px",color:A.color?.toString()??C.colors.hero,background:A.bgColor?.toString()??C.colors.grey3,border:`1px solid ${A.borderColor?.toString()??C.colors.hero}`,borderRadius:t.sp[1]}),valueContainer:$=>({...$,maxWidth:"100%",height:"100%",cursor:"pointer",...f,overflow:"visible",minWidth:"auto",padding:0,display:"flex",justifyContent:d??"flex-start",alignItems:"center",flexWrap:"nowrap"}),menu:$=>({...$,backgroundColor:b,borderRadius:t.sp[1],boxShadow:`${t.Space.sp0} 2px ${t.Space.sp2} ${C.colors.dropShadowHover}`,whiteSpace:"nowrap",minWidth:"fit-content",zIndex:20,width:156,margin:0}),menuList:$=>({...$,borderRadius:t.sp[1]}),placeholder:($,{isFocused:A})=>({...$,width:"100%",margin:0,color:A?C.colors.primary:"currentColor"}),option:($,{isSelected:A,isFocused:I,isDisabled:w,data:k})=>({...$,...j,height:t.sp[6],color:A?l??C.colors.champion:C.colors.hero,backgroundColor:A?y:I?C.colors.background:b,cursor:w?"not-allowed":"pointer",borderTop:k.topBorder===!0?`1px solid ${C.colors.grey3}`:"none",":hover":{backgroundColor:C.colors.background,color:C.colors.primary},"& label":{paddingRight:"10px",cursor:w?"not-allowed":A?"default":"pointer"},">div>div>div:first-of-type":{display:"flex"}}),input:()=>({display:"inline-grid",color:C.colors.primary,overflow:"hidden",zIndex:2,minWidth:"auto",maxWidth:"100%",height:t.sp[4],input:{...t.textStyles.standardBold.cssObject}}),indicatorSeparator:()=>({}),dropdownIndicator:()=>({})};return o.jsxRuntimeExports.jsx(Hc,{onClick:$=>$.stopPropagation(),"data-testid":t.generateDataTestId("cockpit-single-value-picker"),children:o.jsxRuntimeExports.jsx(o.StateManagedSelect$1,{onChange:$=>{if($){const A=e.find(I=>I.value.name===$.name);p(A)}},menuPlacement:"auto",minMenuHeight:208,defaultValue:h,value:h,menuShouldScrollIntoView:!1,components:{Option:Qc,DropdownIndicator:Kc,IndicatorSeparator:Gc,SingleValue:Jc},hideSelectedOptions:!1,closeMenuOnSelect:!1,styles:E,options:g,isClearable:!1,isSearchable:!1,placeholder:o.jsxRuntimeExports.jsxs(Yc,{"data-testid":t.generateDataTestId("cockpit-single-value-picker-placeholder"),children:[o.jsxRuntimeExports.jsx(Zc,{children:o.jsxRuntimeExports.jsx(Xc,{})}),o.jsxRuntimeExports.jsx(qc,{children:x??"Select..."})]})})})}const Kc=()=>null,Gc=()=>null,Yc=s.div`
|
|
528
528
|
display: flex;
|
|
529
529
|
align-items: center;
|
|
530
530
|
color: ${e=>e.theme.colors.grey1};
|
|
@@ -647,7 +647,7 @@
|
|
|
647
647
|
width: 70%;
|
|
648
648
|
`,Id=({registerOptions:e,name:n,value:r})=>{const{control:i}=o.useFormContext();return o.jsxRuntimeExports.jsx(o.Controller,{name:n,control:i,defaultValue:r,rules:e,render:({field:{value:a,onChange:d}})=>o.jsxRuntimeExports.jsx(Td,{onSelectionChanged:l=>d({allGroups:r.allGroups,selectedValue:r.allGroups[l]}),selectedGroupIndex:r.allGroups.findIndex(l=>l.id===a.selectedValue?.id),allGroups:r.allGroups})})},We=t.appLocale.getLocalizedStrings().cockpit.management.header,Ct=[{key:"companyName",value:We.name,sortOrder:"ascending",width:new t.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"task",value:We.task,sortOrder:"ascending",width:new t.ResponsiveSized(117,117),isThreadAllowed:!0},{key:"status",value:We.status,sortOrder:"ascending",width:new t.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"group",value:We.group,sortOrder:"ascending",width:new t.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"plans",value:We.plans,sortOrder:"ascending",width:new t.ResponsiveSized(275,275),isThreadAllowed:!0},{key:"satisfaction",value:We.satisfaction,sortOrder:"ascending",width:new t.ResponsiveSized(149,149),isThreadAllowed:!0},{key:"bookCloseDate",value:We.bookCloseDate,sortOrder:"ascending",width:new t.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"reportSent",value:We.reportSent,sortOrder:"ascending",width:new t.ResponsiveSized(380,380),isThreadAllowed:!0},{key:"controller",value:We.controller,sortOrder:"ascending",width:new t.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"customerSuccessManager",value:We.customerSuccessManager,sortOrder:"ascending",width:new t.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"preparer",value:We.preparer,sortOrder:"ascending",width:new t.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"reviewer",value:We.reviewer,sortOrder:"ascending",width:new t.ResponsiveSized(216,216),isThreadAllowed:!0},{key:"apAnalyst",value:We.apAnalyst,sortOrder:"ascending",width:new t.ResponsiveSized(216,216),isThreadAllowed:!0},{key:"taxStatus",value:We.taxStatus,sortOrder:"ascending",width:new t.ResponsiveSized(282,282),isThreadAllowed:!0},{key:"taxLead",value:We.taxLead,sortOrder:"ascending",width:new t.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:We.monthlyRecurringRevenue,sortOrder:"ascending",width:new t.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"annualRecurringRevenue",value:We.annualRecurringRevenue,sortOrder:"ascending",width:new t.ResponsiveSized(196,196),isThreadAllowed:!0}];Ct.map(e=>e.key);var Oe=(e=>(e.CUSTOMER="customer",e.TEAM="team",e))(Oe||{});const Ld=({activeEntity:e,teamNote:n,customerNote:r})=>e===Oe.CUSTOMER?r:e===Oe.TEAM?n:"",Ad=({activeEntity:e,teamRating:n,customerRating:r})=>{if(e===Oe.CUSTOMER)return r;if(e===Oe.TEAM)return n},Dd=({activeEntity:e,teamRatingLastUpdatedBy:n,customerRatingLastUpdatedBy:r})=>{if(e===Oe.CUSTOMER)return r;if(e===Oe.TEAM)return n},Od=({activeEntity:e,customerRatingLastUpdatedDate:n,teamRatingLastUpdatedDate:r})=>{if(e===Oe.CUSTOMER)return n;if(e===Oe.TEAM)return r},ls=({teamRating:e,teamNote:n,customerRating:r,customerNote:i,activeEntity:a})=>{const d=Ad({activeEntity:a,teamRating:e,customerRating:r}),l=Ld({activeEntity:a,teamNote:n,customerNote:i});return{savedOption:d,savedNote:l}},Nd=({teamRating:e,customerRating:n,teamNote:r,customerNote:i,activeEntity:a,selectedOption:d,noteValue:l})=>{if(a!=null){const{savedOption:c,savedNote:p}=ls({teamRating:e,teamNote:r,customerRating:n,customerNote:i,activeEntity:a});return l.trim().length===0||c===d&&l===p||c!==d&&l===Ti(p)}return!0},Ti=e=>`
|
|
649
649
|
---------------
|
|
650
|
-
${e}`,Md=e=>
|
|
650
|
+
${e}`,Md=e=>ae.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ae.createElement("circle",{cx:17,cy:22,r:16,stroke:"currentColor",strokeWidth:1.5,strokeDasharray:"3 3"}),ae.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.5 16H16V21H11V22.5H16V28H17.5V22.5H23V21H17.5V16Z",fill:"currentColor"}),ae.createElement("rect",{x:20,width:18,height:18,rx:9,fill:"currentColor"}),ae.createElement("path",{d:"M30.9863 10.2227H32.4512C32.4043 10.7812 32.248 11.2793 31.9824 11.7168C31.7168 12.1504 31.3438 12.4922 30.8633 12.7422C30.3828 12.9922 29.7988 13.1172 29.1113 13.1172C28.584 13.1172 28.1094 13.0234 27.6875 12.8359C27.2656 12.6445 26.9043 12.375 26.6035 12.0273C26.3027 11.6758 26.0723 11.252 25.9121 10.7559C25.7559 10.2598 25.6777 9.70508 25.6777 9.0918V8.38281C25.6777 7.76953 25.7578 7.21484 25.918 6.71875C26.082 6.22266 26.3164 5.79883 26.6211 5.44727C26.9258 5.0918 27.291 4.82031 27.7168 4.63281C28.1465 4.44531 28.6289 4.35156 29.1641 4.35156C29.8438 4.35156 30.418 4.47656 30.8867 4.72656C31.3555 4.97656 31.7188 5.32227 31.9766 5.76367C32.2383 6.20508 32.3984 6.71094 32.457 7.28125H30.9922C30.9531 6.91406 30.8672 6.59961 30.7344 6.33789C30.6055 6.07617 30.4141 5.87695 30.1602 5.74023C29.9062 5.59961 29.5742 5.5293 29.1641 5.5293C28.8281 5.5293 28.5352 5.5918 28.2852 5.7168C28.0352 5.8418 27.8262 6.02539 27.6582 6.26758C27.4902 6.50977 27.3633 6.80859 27.2773 7.16406C27.1953 7.51562 27.1543 7.91797 27.1543 8.37109V9.0918C27.1543 9.52148 27.1914 9.91211 27.2656 10.2637C27.3438 10.6113 27.4609 10.9102 27.6172 11.1602C27.7773 11.4102 27.9805 11.6035 28.2266 11.7402C28.4727 11.877 28.7676 11.9453 29.1113 11.9453C29.5293 11.9453 29.8672 11.8789 30.125 11.7461C30.3867 11.6133 30.584 11.4199 30.7168 11.166C30.8535 10.9082 30.9434 10.5938 30.9863 10.2227Z"})),zd=e=>ae.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ae.createElement("circle",{cx:17,cy:22,r:16,stroke:"currentColor",strokeWidth:1.5,strokeDasharray:"3 3"}),ae.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.5 16H16V21H11V22.5H16V28H17.5V22.5H23V21H17.5V16Z",fill:"currentColor"}),ae.createElement("rect",{x:20,width:18,height:18,rx:9,fill:"currentColor"}),ae.createElement("path",{d:"M32.2109 11.834V13H26.2871V11.834H32.2109ZM32.0762 5.37695L26.832 13H25.8477V12.0684L31.1094 4.46875H32.0762V5.37695ZM31.5312 4.46875V5.64062H25.8828V4.46875H31.5312Z"})),Hs=s.button`
|
|
651
651
|
background: none;
|
|
652
652
|
border: none;
|
|
653
653
|
cursor: pointer;
|
|
@@ -754,7 +754,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
754
754
|
height: ${t.Space.sp1};
|
|
755
755
|
background-color: ${e=>e.theme.colors.grey1};
|
|
756
756
|
order: 2;
|
|
757
|
-
`,Pi=({time:e,user:n})=>{const{cockpit:r,dateFormat:{visual:i},timeFormat:a}=t.appLocale.getLocalizedStrings();return o.jsxRuntimeExports.jsxs(ip,{children:[!!n&&o.jsxRuntimeExports.jsx(op,{children:n?.photo!==void 0?o.jsxRuntimeExports.jsx(ap,{src:n?.photo.href,alt:r.userProfileAltText,onError:({currentTarget:d})=>{d.onerror=null,d.src=t.AvatarSVG},loading:"lazy"}):o.jsxRuntimeExports.jsx(t.EntityAvatarWithInitials,{firstName:n?.firstName??"",lastName:n?.lastName??""})}),o.jsxRuntimeExports.jsxs(rp,{children:[n&&o.jsxRuntimeExports.jsx(sp,{children:`${n.firstName} ${n.lastName}`}),!!e&&o.jsxRuntimeExports.jsxs(np,{children:[e!=null&&o.jsxRuntimeExports.jsxs(ep,{children:[o.jsxRuntimeExports.jsx(t.SvgClock,{width:t.Space.sp3,height:t.Space.sp3}),
|
|
757
|
+
`,Pi=({time:e,user:n})=>{const{cockpit:r,dateFormat:{visual:i},timeFormat:a}=t.appLocale.getLocalizedStrings();return o.jsxRuntimeExports.jsxs(ip,{children:[!!n&&o.jsxRuntimeExports.jsx(op,{children:n?.photo!==void 0?o.jsxRuntimeExports.jsx(ap,{src:n?.photo.href,alt:r.userProfileAltText,onError:({currentTarget:d})=>{d.onerror=null,d.src=t.AvatarSVG},loading:"lazy"}):o.jsxRuntimeExports.jsx(t.EntityAvatarWithInitials,{firstName:n?.firstName??"",lastName:n?.lastName??""})}),o.jsxRuntimeExports.jsxs(rp,{children:[n&&o.jsxRuntimeExports.jsx(sp,{children:`${n.firstName} ${n.lastName}`}),!!e&&o.jsxRuntimeExports.jsxs(np,{children:[e!=null&&o.jsxRuntimeExports.jsxs(ep,{children:[o.jsxRuntimeExports.jsx(t.SvgClock,{width:t.Space.sp3,height:t.Space.sp3}),ee.zeniDate(e.toISOString()).format(e.year()===ee.dateNow().year()?i.MMMDFormat:i.MMMDCommaYYYYformat)]}),o.jsxRuntimeExports.jsx(lp,{}),e!=null&&o.jsxRuntimeExports.jsx(tp,{children:ee.zeniDate(e.toISOString()).format(a.hhmmAFormat)})]})]})]})},cp=s.div`
|
|
758
758
|
display: flex;
|
|
759
759
|
flex-direction: column;
|
|
760
760
|
`,dp=s.div`
|
|
@@ -777,7 +777,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
777
777
|
display: flex;
|
|
778
778
|
column-gap: ${t.Space.sp3};
|
|
779
779
|
align-items: center;
|
|
780
|
-
`,Sp=({customerSatisfaction:e,onSave:n})=>{const[r,i]=u.useState(),[a,d]=u.useState(),[l,c]=u.useState(""),p=u.useRef(null),m=u.useRef(null),x=u.useCallback(E=>{const{savedOption:$,savedNote:A}=ls({...e,activeEntity:E});d($),c(A)},[e]),g=u.useCallback(E=>{if(E!==a&&r!=null){const{savedOption:$,savedNote:A}=ls({...e,activeEntity:r});if(d(E),$!=null){if(E===$){c(A);return}c(Ti(A));return}c("")}},[a,r,e]),h=u.useCallback(E=>{c(E.target.value)},[]),C=u.useCallback((E,$)=>{$.preventDefault(),i(E),x(E)},[x]),b=u.useCallback(()=>{i(void 0),d(void 0),c("")},[]),S=u.useCallback(()=>{const E={...e};E.customerSatisfactionId=e.customerSatisfactionId,r===Oe.CUSTOMER&&(E.customerRating=a,E.customerNote=l),r===Oe.TEAM&&(E.teamRating=a,E.teamNote=l),i(void 0),n(E)},[a,l,r,e,n]),y=r===Oe.CUSTOMER?To:r===Oe.TEAM?eo:{},j=Nd({...e,activeEntity:r,selectedOption:a,noteValue:l}),f=()=>{const E=r===Oe.CUSTOMER?p.current:m.current;return o.jsxRuntimeExports.jsx(hp,{onClose:b,anchorEl:E,open:!!r,children:o.jsxRuntimeExports.jsx(xp,{customerSatisfactionOptions:y,selectedOption:a,noteValue:l,lastUpdatedBy:Dd({...e,activeEntity:r}),lastUpdatedTime:Od({...e,activeEntity:r}),savedOption:r===Oe.CUSTOMER?e.customerRating:e.teamRating,saveBtnDisabled:j,onCancel:b,onSave:S,onOptionChange:g,onNoteChange:h})})};return o.jsxRuntimeExports.jsxs(gp,{children:[o.jsxRuntimeExports.jsx(cs,{ref:p,savedRating:e.customerRating,isActive:r===Oe.CUSTOMER,entityType:Oe.CUSTOMER,onClick:C}),o.jsxRuntimeExports.jsx(cs,{ref:m,savedRating:e.teamRating,isActive:r===Oe.TEAM,entityType:Oe.TEAM,onClick:C}),f()]})},yp=({name:e,value:n,registerOptions:r})=>{const{control:i}=o.useFormContext();return o.jsxRuntimeExports.jsx(o.Controller,{name:e,control:i,defaultValue:n,rules:r,render:({field:{onChange:a}})=>o.jsxRuntimeExports.jsx(Sp,{customerSatisfaction:n,onSave:a})})},fp={blocked:{bgColor:new o.Color(t.Colors.importantLight),color:new o.Color(t.Colors.important),borderColor:new o.Color(t.Colors.important)},missing_info:{bgColor:new o.Color(t.Colors.importantLight),color:new o.Color(t.Colors.important),borderColor:new o.Color(t.Colors.important)},in_progress:{bgColor:new o.Color(t.Colors.alertLight),color:new o.Color(t.Colors.alertDark),borderColor:new o.Color(t.Colors.alertDark)},awaiting_client_approval:{bgColor:new o.Color(t.Colors.infoLight),color:new o.Color(t.Colors.infoDark),borderColor:new o.Color(t.Colors.infoDark)},no_info_received:{bgColor:new o.Color(t.lightColors.grey3),color:new o.Color(t.lightColors.hero),borderColor:new o.Color(t.lightColors.hero)},extension_filed:{bgColor:new o.Color(t.Colors.successLight),color:new o.Color(t.Colors.successDark),borderColor:new o.Color(t.Colors.successDark)},return_filed:{bgColor:new o.Color(t.Colors.successLight),color:new o.Color(t.Colors.successDark),borderColor:new o.Color(t.Colors.successDark)}},Cp=e=>e.map(n=>({value:n,options:fp[n.code]})),jp=({onSelectionChanged:e,selectedTaxStatusIndex:n,allTaxStatuses:r})=>{const i=Cp(r);return o.jsxRuntimeExports.jsx(Cs,{customization:{placeholderLabel:t.appLocale.getLocalizedStrings().cockpit.management.placeholder.taxStatus},onSelectedValueChanged:a=>{const d=i.findIndex(l=>l.value.code===(a?.value).code);e(d,a?.value)},allowedValues:i,selectedValue:n!=null?i[n]:void 0})},bp=({value:e,registerOptions:n,name:r})=>{const{control:i}=o.useFormContext();return o.jsxRuntimeExports.jsx(o.Controller,{name:r,control:i,defaultValue:e,rules:n,render:({field:{value:a,onChange:d}})=>o.jsxRuntimeExports.jsx(jp,{onSelectionChanged:l=>d({allGroups:e.allTaxStatuses,selectedValue:e.allTaxStatuses[l]}),selectedTaxStatusIndex:e.allTaxStatuses.findIndex(l=>l.code===a.selectedValue?.code),allTaxStatuses:e.allTaxStatuses})})},Vt=e=>le.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},le.createElement("path",{d:"M6 8H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M6 6H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M9.5 14.5C9.62209 14.5 9.73252 14.4545 9.81934 14.3818C9.83066 14.3724 9.843 14.364 9.85352 14.3535L13.3535 10.8535C13.4221 10.7849 13.4706 10.6965 13.4902 10.5977C13.4966 10.5657 13.5 10.533 13.5 10.5V2.5C13.5 2.23479 13.3946 1.98051 13.207 1.79297C13.0195 1.60543 12.7652 1.5 12.5 1.5H3.5C3.23478 1.5 2.98051 1.60543 2.79297 1.79297C2.60543 1.98051 2.5 2.23478 2.5 2.5V13.5C2.5 13.7652 2.60543 14.0195 2.79297 14.207C2.9805 14.3946 3.23478 14.5 3.5 14.5H9.5ZM3.5 2.5H12.5V10H9.5C9.22386 10 9 10.2239 9 10.5V13.5H3.5V2.5ZM10 11H11.793L10 12.793V11Z",fill:"currentColor"})),Ii=e=>le.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},le.createElement("path",{d:"M11 14.9629H2V3.86499",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M10.0559 8.31177H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M10.0559 5.7395H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M6.52014 5.73978L7.163 6.38264L8.44871 5.09692",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M6.52014 8.31107L7.163 8.95393L8.44871 7.66821",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M13.5591 1.02539H4.74212C4.49865 1.02539 4.30127 1.36118 4.30127 1.77539V12.2754C4.30127 12.6896 4.49865 13.0254 4.74212 13.0254H13.5591C13.8026 13.0254 14 12.6896 14 12.2754V1.77539C14 1.36118 13.8026 1.02539 13.5591 1.02539Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{cockpit:{management:{placeholder:Ks,editMonthInsight:Rp,createMonthInsight:$p,monthInsightSent:Ep,monthInsightNotReady:vp,monthInsightsCanBeSentFromDashboard:wp,sendMonthInsightsFromDashboardWhenReady:kp,monthInsightsCanBeEditedFromDashboard:Tp,monthEndHistoryUnavailable:Pp}},dateFormat:Li,common:bo}=t.appLocale.getLocalizedStrings(),Ip=["status","group","reportSent","taxStatus","customerSatisfaction"],Lp=({reportSent:e,hasMonthEndEmailHistory:n,onReportSentClick:r})=>{if(e.date==null)return o.jsxRuntimeExports.jsx(Cn,{children:bo.strings.hyphen});const i=`${bo.datePicker.businessDay} ${e.businessDay??bo.strings.empty}${bo.strings.colon} ${e.date.format(Li.visual.DMMMFormat)}`;return n?o.jsxRuntimeExports.jsx(Cn,{onClick:r,children:i}):o.jsxRuntimeExports.jsx(t.Tooltip,{placement:"bottom-end",variant:"small-description",data:Pp,style:{color:t.Colors.championDark,marginTop:t.Space.sp2},display:"flex",children:o.jsxRuntimeExports.jsx(Cn,{children:i})})},Ap=({companyView:e,hasMonthEndEmailHistory:n,companiesExcludedFromMonthEndReport:r,showDetailsPageLink:i,allUsers:a,loggedInUserRole:d,companyNameSticky:l,totalHeight:c,isExpenseAutomationEnabledForUser:p,addThreadRequestThreadId:m,targetElementFromNavigation:x,resetTargetElementFromNavigation:g,setNoteData:h,setElementRef:C,setAddThreadRequestThreadId:b,changeHandlers:S,onCompanyNameClicked:y,onPassportIconClicked:j,onTaskIconClicked:f,onViewDetailsLinkClicked:E,onMonthEndReportPageClick:$,showMonthEndReportHistoricData:A})=>{const[I,v]=u.useState(null),w=t.useWindowSizeContext(),F=o.useForm({mode:"all"}),[D,K]=u.useState(!1),{companyId:M,name:G}=e.company.company.companyInfo,q=["companyData.status","companyData.group","companyData.controller","companyData.customerSuccessManager","companyData.preparer","companyData.reviewer","companyData.apAnalyst","companyData.reportSent","companyData.taxStatus","companyData.taxLead","companyData.customerSatisfaction"],R=`cockpit_${M}`,L="management.notes",{threads:W,isLoading:k}=t.useFilteredThreads({entityType:L,companyId:M},!1),{openThread:P,threads:N,addThread:Q,removeThread:ae,setOpenThread:z}=u.useContext(t.ThreadsContext),Y=P!==null?N.get(P):null,T=P?.includes(M)===!0,te=P!=null&&N.get(P)==null&&T,re=m!=null&&N.get(m)?.metadata.companyId===M,Z=(_,ce)=>{q.includes(_)&&S(M,ce)};u.useEffect(()=>{const _=F.watch((ce,{name:Se})=>{Se!=null&&ce.companyData!=null&&o.defer(()=>Z(Se,qp(ce.companyData,Se)))});return()=>{_.unsubscribe()}});const ie=Xp(e,a),ne=()=>{e.company.schema.status.length===0?K(!0):y(e)},xe=()=>{$?.(e)},ye=d?.userRoles?.includes("admin"),$e=e.company.company.configInfo.isMonthEndReportInDraft,V=J.canSendMonthEndEmailReport(e,r),ee=J.shouldEnableCalendarPickerForLastReportSent(e,r),ge=e.company.company.companyInfo.bookCloseDate,ve=e.company.company.managementInfo.lastReportSentDate,Ce=e.taskSummary?.count??0,O=u.useCallback(()=>{P?.includes(t.NEW_THREAD_SUFFIX)===!0&&ae(P),m!=null&&b(void 0)},[m,P,ae,b]),ke=u.useCallback(_=>{if(_===P)z(null);else if(N.has(_))z(_);else if(_.includes(t.NEW_THREAD_SUFFIX)){const[ce,Se]=_.replace(t.NEW_THREAD_SUFFIX,"").split("."),fe=_t(Rt(ce),J.toManagementSortKeyType(Se),M,G);Q(_,{type:"thread",visibility:"public",id:_,roomId:R,createdAt:new Date,updatedAt:new Date,comments:[],metadata:fe,resolved:!1}),z(_)}},[M,G,P,N,Q,z,R]),B=u.useCallback((_,ce,Se=!1)=>{const fe=Ct.find(Ie=>Ie.key===ce);if(g(),fe!=null&&(_.type==="contextmenu"||Se===!0)){if(fe.isThreadAllowed===!1)return;O(),_.preventDefault(),_.stopPropagation();const Ie=t.toCollaborationEntityType({tab:"management",key:fe.key});if(_.target instanceof HTMLElement||_.target instanceof SVGElement)if(Se===!0&&_.target instanceof HTMLElement)v(_.target.parentElement);else if(_.target instanceof HTMLElement){const Le=fs(_.target,oe);v(Le||_.target)}else{const Le=_.target.closest(`.${oe}`);Le instanceof HTMLElement&&v(Le)}const H=[...t.getFilteredThreads(N,{entityType:Ie,companyId:M},"both")],ue=H.length>0&&H[0].length>0?H[0][0]:Pe("management",fe.key,M);N.has(ue)?ke(ue):m===ue?b(void 0):(b(ue),z(null))}},[N,M,m,ke,b,z,g,O]),de=u.useCallback((_,ce)=>{_.stopPropagation();const Se=Pe("management",ce,M);b(void 0),ke(Se)},[M,b,ke]),je=()=>{ie.reportSent.date!=null&&A(M,ie.reportSent.date)},U=_=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:_.isElementThreadOpen??!1,isElementThreadPresent:_.isElementThreadPresent??!1,itemKey:_.itemKey,elementThreadId:_.elementThreadId??"",roomId:R,addThreadRequestThreadId:m,openThreadId:P,threadStyle:_.threadStyle,openThreadMetadata:Y?.metadata??null,onElementClick:B,onAddThreadClick:de,targetElement:x??I});return o.jsxRuntimeExports.jsxs(o.FormProvider,{...F,children:[D===!0?o.jsxRuntimeExports.jsx(Cd,{companyDomain:e.company.company.companyInfo.primaryEmailDomain,hasAdminRole:ye,onCancelClick:()=>K(!1),onConnectClick:()=>y(e)}):null,o.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{g(),m!=null&&(b(void 0),m.includes(t.NEW_THREAD_SUFFIX)&&ae(m))},children:o.jsxRuntimeExports.jsx(Dp,{windowSize:w,hoverParentSubsidiaryTag:i??!1,isThreadOpen:T||re,totalHeight:c,isCreationInProgress:te,children:Ct.map((_,ce)=>{const Se=t.toCollaborationEntityType({tab:"management",key:_.key}),fe=Ct.length-2<=ce,Ie=[...t.getFilteredThreads(N,{entityType:Se,companyId:M},"both")],H=Ie.length>0&&Ie[0].length>0?Ie[0][0]:Pe("management",_.key,M),ue=N.get(H),Le=ue!=null&&ue.resolved===!1,Be=H===P,me=m===H;switch(_.key){case"companyName":return o.jsxRuntimeExports.jsxs(Fp,{companyNameSticky:l,columnWidth:_.width,windowSize:w,isThreadOpen:Be||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),ref:X=>{C(M,_.key,X)},children:[o.jsxRuntimeExports.jsxs(Mp,{children:[o.jsxRuntimeExports.jsx(zp,{className:"company-name",onClick:X=>{X.preventDefault(),X.stopPropagation(),ne()},children:ie.companyName}),ie.parentSubsidiaryInfo&&o.jsxRuntimeExports.jsx(_c,{companyId:ie.companyId,isEnabled:i,onViewDetailsLinkClicked:E,companyName:ie.companyName,parentSubsidiaryRelationship:ie.parentSubsidiaryInfo}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:Be,targetElement:x??I,roomId:R,openThreadId:P,openThreadMetadata:Y?.metadata??null})]}),o.jsxRuntimeExports.jsxs(Bp,{children:[o.jsxRuntimeExports.jsxs(Vp,{onClick:X=>{X.preventDefault(),h({roomId:R,companyId:M,companyName:G,entityType:L})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:W.length,isLoading:k}),o.jsxRuntimeExports.jsx(Up,{})]}),o.jsxRuntimeExports.jsx(Wp,{onClick:X=>{X.preventDefault(),j(e)},children:o.jsxRuntimeExports.jsx(_p,{className:"passportIcon"})})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:Le,itemKey:_.key,style:{left:t.Space.sp4},onElementClick:B}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Pe("management",_.key,M),addThreadRequestThreadId:m,itemKey:_.key,onAddThreadClick:de})]},H);case"task":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[o.jsxRuntimeExports.jsxs(Hp,{onClick:X=>{X.preventDefault(),f?.(e)},children:[o.jsxRuntimeExports.jsx(Kp,{}),Ce>0?o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{isLoading:!1,count:Ce}):null]}),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"status":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[o.jsxRuntimeExports.jsx(rd,{name:"companyData.status",value:ie.status}),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"group":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[o.jsxRuntimeExports.jsx(Id,{name:"companyData.group",value:ie.group}),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"plans":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[o.jsxRuntimeExports.jsx($d,{chips:ie.plansAndAddons}),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"satisfaction":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},windowSize:w,columnWidth:_.width,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[o.jsxRuntimeExports.jsx(yp,{name:"companyData.customerSatisfaction",value:ie.customerSatisfaction}),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"bookCloseDate":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[ge?.format(Li.visual.MMMDCommaYYYYformat)??bo.strings.hyphen,U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"reportSent":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),style:{alignItems:"center"},children:[ee&&o.jsxRuntimeExports.jsx(Np,{children:o.jsxRuntimeExports.jsx(t.ZeniDatePickerField,{name:"companyData.reportSent",defaultValue:ie.reportSent})}),!ee&&o.jsxRuntimeExports.jsx(Lp,{reportSent:ie.reportSent,onReportSentClick:je,hasMonthEndEmailHistory:n}),o.jsxRuntimeExports.jsx(Op,{children:p?o.jsxRuntimeExports.jsx(eu,{isMonthEndReportInDraft:$e,bookCloseDate:ge,lastReportSentDate:ve,enableCompanyMonthEndReportBtn:V,handleMonthEndReportPageClick:xe}):o.jsxRuntimeExports.jsx(ds,{isMonthEndReportInDraft:$e,bookCloseDate:ge,lastReportSentDate:ve,enableCompanyMonthEndReportBtn:V,isExpenseAutomationEnabledForUser:p,handleMonthEndReportPageClick:xe})}),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"customerSuccessManager":case"preparer":case"reviewer":case"apAnalyst":case"controller":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:`companyData.${_.key}`,value:ie[_.key],placeholderLabel:Ks[_.key],pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"taxStatus":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[o.jsxRuntimeExports.jsx(bp,{name:"companyData.taxStatus",value:ie.taxStatus}),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"taxLead":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:"companyData.taxLead",value:ie.taxLead,placeholderLabel:Ks.taxLead,pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[t.amountToString("0,0",ie.monthlyRecurringRevenue),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);case"annualRecurringRevenue":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(M,_.key,X)},columnWidth:_.width,windowSize:w,isThreadOpen:T||me,isThreadAllowed:_.isThreadAllowed,className:oe,onContextMenu:X=>B(X,_.key),children:[t.amountToString("0,0",ie.annualRecurringRevenue),U({isElementThreadOpen:Be,isElementThreadPresent:Le,itemKey:_.key,elementThreadId:H,threadStyle:fe?{right:t.Space.sp0}:void 0})]},H);default:return null}})})})})]})},ds=({enableCompanyMonthEndReportBtn:e,isMonthEndReportInDraft:n,isExpenseAutomationEnabledForUser:r,bookCloseDate:i,lastReportSentDate:a,handleMonthEndReportPageClick:d})=>o.jsxRuntimeExports.jsx(t.Button,{size:"small",onClick:d,variant:"primary",label:Jp(e,n,i,a),disabled:!e||r,style:e?{}:{background:"transparent"},prefixIcon:e&&n?o.jsxRuntimeExports.jsx(Gp,{}):void 0}),Dp=s.div`
|
|
780
|
+
`,Sp=({customerSatisfaction:e,onSave:n})=>{const[r,i]=u.useState(),[a,d]=u.useState(),[l,c]=u.useState(""),p=u.useRef(null),m=u.useRef(null),x=u.useCallback(E=>{const{savedOption:$,savedNote:A}=ls({...e,activeEntity:E});d($),c(A)},[e]),g=u.useCallback(E=>{if(E!==a&&r!=null){const{savedOption:$,savedNote:A}=ls({...e,activeEntity:r});if(d(E),$!=null){if(E===$){c(A);return}c(Ti(A));return}c("")}},[a,r,e]),h=u.useCallback(E=>{c(E.target.value)},[]),C=u.useCallback((E,$)=>{$.preventDefault(),i(E),x(E)},[x]),b=u.useCallback(()=>{i(void 0),d(void 0),c("")},[]),S=u.useCallback(()=>{const E={...e};E.customerSatisfactionId=e.customerSatisfactionId,r===Oe.CUSTOMER&&(E.customerRating=a,E.customerNote=l),r===Oe.TEAM&&(E.teamRating=a,E.teamNote=l),i(void 0),n(E)},[a,l,r,e,n]),y=r===Oe.CUSTOMER?To:r===Oe.TEAM?eo:{},j=Nd({...e,activeEntity:r,selectedOption:a,noteValue:l}),f=()=>{const E=r===Oe.CUSTOMER?p.current:m.current;return o.jsxRuntimeExports.jsx(hp,{onClose:b,anchorEl:E,open:!!r,children:o.jsxRuntimeExports.jsx(xp,{customerSatisfactionOptions:y,selectedOption:a,noteValue:l,lastUpdatedBy:Dd({...e,activeEntity:r}),lastUpdatedTime:Od({...e,activeEntity:r}),savedOption:r===Oe.CUSTOMER?e.customerRating:e.teamRating,saveBtnDisabled:j,onCancel:b,onSave:S,onOptionChange:g,onNoteChange:h})})};return o.jsxRuntimeExports.jsxs(gp,{children:[o.jsxRuntimeExports.jsx(cs,{ref:p,savedRating:e.customerRating,isActive:r===Oe.CUSTOMER,entityType:Oe.CUSTOMER,onClick:C}),o.jsxRuntimeExports.jsx(cs,{ref:m,savedRating:e.teamRating,isActive:r===Oe.TEAM,entityType:Oe.TEAM,onClick:C}),f()]})},yp=({name:e,value:n,registerOptions:r})=>{const{control:i}=o.useFormContext();return o.jsxRuntimeExports.jsx(o.Controller,{name:e,control:i,defaultValue:n,rules:r,render:({field:{onChange:a}})=>o.jsxRuntimeExports.jsx(Sp,{customerSatisfaction:n,onSave:a})})},fp={blocked:{bgColor:new o.Color(t.Colors.importantLight),color:new o.Color(t.Colors.important),borderColor:new o.Color(t.Colors.important)},missing_info:{bgColor:new o.Color(t.Colors.importantLight),color:new o.Color(t.Colors.important),borderColor:new o.Color(t.Colors.important)},in_progress:{bgColor:new o.Color(t.Colors.alertLight),color:new o.Color(t.Colors.alertDark),borderColor:new o.Color(t.Colors.alertDark)},awaiting_client_approval:{bgColor:new o.Color(t.Colors.infoLight),color:new o.Color(t.Colors.infoDark),borderColor:new o.Color(t.Colors.infoDark)},no_info_received:{bgColor:new o.Color(t.lightColors.grey3),color:new o.Color(t.lightColors.hero),borderColor:new o.Color(t.lightColors.hero)},extension_filed:{bgColor:new o.Color(t.Colors.successLight),color:new o.Color(t.Colors.successDark),borderColor:new o.Color(t.Colors.successDark)},return_filed:{bgColor:new o.Color(t.Colors.successLight),color:new o.Color(t.Colors.successDark),borderColor:new o.Color(t.Colors.successDark)}},Cp=e=>e.map(n=>({value:n,options:fp[n.code]})),jp=({onSelectionChanged:e,selectedTaxStatusIndex:n,allTaxStatuses:r})=>{const i=Cp(r);return o.jsxRuntimeExports.jsx(Cs,{customization:{placeholderLabel:t.appLocale.getLocalizedStrings().cockpit.management.placeholder.taxStatus},onSelectedValueChanged:a=>{const d=i.findIndex(l=>l.value.code===(a?.value).code);e(d,a?.value)},allowedValues:i,selectedValue:n!=null?i[n]:void 0})},bp=({value:e,registerOptions:n,name:r})=>{const{control:i}=o.useFormContext();return o.jsxRuntimeExports.jsx(o.Controller,{name:r,control:i,defaultValue:e,rules:n,render:({field:{value:a,onChange:d}})=>o.jsxRuntimeExports.jsx(jp,{onSelectionChanged:l=>d({allGroups:e.allTaxStatuses,selectedValue:e.allTaxStatuses[l]}),selectedTaxStatusIndex:e.allTaxStatuses.findIndex(l=>l.code===a.selectedValue?.code),allTaxStatuses:e.allTaxStatuses})})},Vt=e=>ae.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ae.createElement("path",{d:"M6 8H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M6 6H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M9.5 14.5C9.62209 14.5 9.73252 14.4545 9.81934 14.3818C9.83066 14.3724 9.843 14.364 9.85352 14.3535L13.3535 10.8535C13.4221 10.7849 13.4706 10.6965 13.4902 10.5977C13.4966 10.5657 13.5 10.533 13.5 10.5V2.5C13.5 2.23479 13.3946 1.98051 13.207 1.79297C13.0195 1.60543 12.7652 1.5 12.5 1.5H3.5C3.23478 1.5 2.98051 1.60543 2.79297 1.79297C2.60543 1.98051 2.5 2.23478 2.5 2.5V13.5C2.5 13.7652 2.60543 14.0195 2.79297 14.207C2.9805 14.3946 3.23478 14.5 3.5 14.5H9.5ZM3.5 2.5H12.5V10H9.5C9.22386 10 9 10.2239 9 10.5V13.5H3.5V2.5ZM10 11H11.793L10 12.793V11Z",fill:"currentColor"})),Ii=e=>ae.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ae.createElement("path",{d:"M11 14.9629H2V3.86499",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M10.0559 8.31177H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M10.0559 5.7395H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M6.52014 5.73978L7.163 6.38264L8.44871 5.09692",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M6.52014 8.31107L7.163 8.95393L8.44871 7.66821",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M13.5591 1.02539H4.74212C4.49865 1.02539 4.30127 1.36118 4.30127 1.77539V12.2754C4.30127 12.6896 4.49865 13.0254 4.74212 13.0254H13.5591C13.8026 13.0254 14 12.6896 14 12.2754V1.77539C14 1.36118 13.8026 1.02539 13.5591 1.02539Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{cockpit:{management:{placeholder:Ks,editMonthInsight:Rp,createMonthInsight:$p,monthInsightSent:Ep,monthInsightNotReady:vp,monthInsightsCanBeSentFromDashboard:wp,sendMonthInsightsFromDashboardWhenReady:kp,monthInsightsCanBeEditedFromDashboard:Tp,monthEndHistoryUnavailable:Pp}},dateFormat:Li,common:bo}=t.appLocale.getLocalizedStrings(),Ip=["status","group","reportSent","taxStatus","customerSatisfaction"],Lp=({reportSent:e,hasMonthEndEmailHistory:n,onReportSentClick:r})=>{if(e.date==null)return o.jsxRuntimeExports.jsx(Cn,{children:bo.strings.hyphen});const i=`${bo.datePicker.businessDay} ${e.businessDay??bo.strings.empty}${bo.strings.colon} ${e.date.format(Li.visual.DMMMFormat)}`;return n?o.jsxRuntimeExports.jsx(Cn,{onClick:r,children:i}):o.jsxRuntimeExports.jsx(t.Tooltip,{placement:"bottom-end",variant:"small-description",data:Pp,style:{color:t.Colors.championDark,marginTop:t.Space.sp2},display:"flex",children:o.jsxRuntimeExports.jsx(Cn,{children:i})})},Ap=({companyView:e,hasMonthEndEmailHistory:n,companiesExcludedFromMonthEndReport:r,showDetailsPageLink:i,allUsers:a,loggedInUserRole:d,companyNameSticky:l,totalHeight:c,isExpenseAutomationEnabledForUser:p,addThreadRequestThreadId:m,targetElementFromNavigation:x,resetTargetElementFromNavigation:g,setNoteData:h,setElementRef:C,setAddThreadRequestThreadId:b,changeHandlers:S,onCompanyNameClicked:y,onPassportIconClicked:j,onTaskIconClicked:f,onViewDetailsLinkClicked:E,onMonthEndReportPageClick:$,showMonthEndReportHistoricData:A})=>{const[I,w]=u.useState(null),k=t.useWindowSizeContext(),N=o.useForm({mode:"all"}),[D,G]=u.useState(!1),{companyId:O,name:Z}=e.company.company.companyInfo,q=["companyData.status","companyData.group","companyData.controller","companyData.customerSuccessManager","companyData.preparer","companyData.reviewer","companyData.apAnalyst","companyData.reportSent","companyData.taxStatus","companyData.taxLead","companyData.customerSatisfaction"],R=`cockpit_${O}`,T="management.notes",{threads:V,isLoading:W}=t.useFilteredThreads({entityType:T,companyId:O},!1),{openThread:v,threads:L,addThread:J,removeThread:re,setOpenThread:F}=u.useContext(t.ThreadsContext),K=v!==null?L.get(v):null,H=v?.includes(O)===!0,_=v!=null&&L.get(v)==null&&H,oe=m!=null&&L.get(m)?.metadata.companyId===O,ne=(P,me)=>{q.includes(P)&&S(O,me)};u.useEffect(()=>{const P=N.watch((me,{name:be})=>{be!=null&&me.companyData!=null&&o.defer(()=>ne(be,qp(me.companyData,be)))});return()=>{P.unsubscribe()}});const Y=Xp(e,a),le=()=>{e.company.schema.status.length===0?G(!0):y(e)},ce=()=>{$?.(e)},fe=d?.userRoles?.includes("admin"),we=e.company.company.configInfo.isMonthEndReportInDraft,B=ee.canSendMonthEndEmailReport(e,r),Se=ee.shouldEnableCalendarPickerForLastReportSent(e,r),ie=e.company.company.companyInfo.bookCloseDate,ye=e.company.company.managementInfo.lastReportSentDate,Ie=e.taskSummary?.count??0,xe=u.useCallback(()=>{v?.includes(t.NEW_THREAD_SUFFIX)===!0&&re(v),m!=null&&b(void 0)},[m,v,re,b]),M=u.useCallback(P=>{if(P===v)F(null);else if(L.has(P))F(P);else if(P.includes(t.NEW_THREAD_SUFFIX)){const[me,be]=P.replace(t.NEW_THREAD_SUFFIX,"").split("."),pe=_t(Rt(me),ee.toManagementSortKeyType(be),O,Z);J(P,{type:"thread",visibility:"public",id:P,roomId:R,createdAt:new Date,updatedAt:new Date,comments:[],metadata:pe,resolved:!1}),F(P)}},[O,Z,v,L,J,F,R]),z=u.useCallback((P,me,be=!1)=>{const pe=Ct.find(De=>De.key===me);if(g(),pe!=null&&(P.type==="contextmenu"||be===!0)){if(pe.isThreadAllowed===!1)return;xe(),P.preventDefault(),P.stopPropagation();const De=t.toCollaborationEntityType({tab:"management",key:pe.key});if(P.target instanceof HTMLElement||P.target instanceof SVGElement)if(be===!0&&P.target instanceof HTMLElement)w(P.target.parentElement);else if(P.target instanceof HTMLElement){const Ee=fs(P.target,te);w(Ee||P.target)}else{const Ee=P.target.closest(`.${te}`);Ee instanceof HTMLElement&&w(Ee)}const je=[...t.getFilteredThreads(L,{entityType:De,companyId:O},"both")],U=je.length>0&&je[0].length>0?je[0][0]:Pe("management",pe.key,O);L.has(U)?M(U):m===U?b(void 0):(b(U),F(null))}},[L,O,m,M,b,F,g,xe]),Ce=u.useCallback((P,me)=>{P.stopPropagation();const be=Pe("management",me,O);b(void 0),M(be)},[O,b,M]),ue=()=>{Y.reportSent.date!=null&&A(O,Y.reportSent.date)},Q=P=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:P.isElementThreadOpen??!1,isElementThreadPresent:P.isElementThreadPresent??!1,itemKey:P.itemKey,elementThreadId:P.elementThreadId??"",roomId:R,addThreadRequestThreadId:m,openThreadId:v,threadStyle:P.threadStyle,openThreadMetadata:K?.metadata??null,onElementClick:z,onAddThreadClick:Ce,targetElement:x??I});return o.jsxRuntimeExports.jsxs(o.FormProvider,{...N,children:[D===!0?o.jsxRuntimeExports.jsx(Cd,{companyDomain:e.company.company.companyInfo.primaryEmailDomain,hasAdminRole:fe,onCancelClick:()=>G(!1),onConnectClick:()=>y(e)}):null,o.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{g(),m!=null&&(b(void 0),m.includes(t.NEW_THREAD_SUFFIX)&&re(m))},children:o.jsxRuntimeExports.jsx(Dp,{windowSize:k,hoverParentSubsidiaryTag:i??!1,isThreadOpen:H||oe,totalHeight:c,isCreationInProgress:_,children:Ct.map((P,me)=>{const be=t.toCollaborationEntityType({tab:"management",key:P.key}),pe=Ct.length-2<=me,De=[...t.getFilteredThreads(L,{entityType:be,companyId:O},"both")],je=De.length>0&&De[0].length>0?De[0][0]:Pe("management",P.key,O),U=L.get(je),Ee=U!=null&&U.resolved===!1,Be=je===v,he=m===je;switch(P.key){case"companyName":return o.jsxRuntimeExports.jsxs(Fp,{companyNameSticky:l,columnWidth:P.width,windowSize:k,isThreadOpen:Be||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),ref:X=>{C(O,P.key,X)},children:[o.jsxRuntimeExports.jsxs(Mp,{children:[o.jsxRuntimeExports.jsx(zp,{className:"company-name",onClick:X=>{X.preventDefault(),X.stopPropagation(),le()},children:Y.companyName}),Y.parentSubsidiaryInfo&&o.jsxRuntimeExports.jsx(_c,{companyId:Y.companyId,isEnabled:i,onViewDetailsLinkClicked:E,companyName:Y.companyName,parentSubsidiaryRelationship:Y.parentSubsidiaryInfo}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:Be,targetElement:x??I,roomId:R,openThreadId:v,openThreadMetadata:K?.metadata??null})]}),o.jsxRuntimeExports.jsxs(Bp,{children:[o.jsxRuntimeExports.jsxs(Vp,{onClick:X=>{X.preventDefault(),h({roomId:R,companyId:O,companyName:Z,entityType:T})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:V.length,isLoading:W}),o.jsxRuntimeExports.jsx(Up,{})]}),o.jsxRuntimeExports.jsx(Wp,{onClick:X=>{X.preventDefault(),j(e)},children:o.jsxRuntimeExports.jsx(_p,{className:"passportIcon"})})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:Ee,itemKey:P.key,style:{left:t.Space.sp4},onElementClick:z}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Pe("management",P.key,O),addThreadRequestThreadId:m,itemKey:P.key,onAddThreadClick:Ce})]},je);case"task":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[o.jsxRuntimeExports.jsxs(Hp,{onClick:X=>{X.preventDefault(),f?.(e)},children:[o.jsxRuntimeExports.jsx(Kp,{}),Ie>0?o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{isLoading:!1,count:Ie}):null]}),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"status":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[o.jsxRuntimeExports.jsx(rd,{name:"companyData.status",value:Y.status}),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"group":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[o.jsxRuntimeExports.jsx(Id,{name:"companyData.group",value:Y.group}),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"plans":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[o.jsxRuntimeExports.jsx($d,{chips:Y.plansAndAddons}),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"satisfaction":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},windowSize:k,columnWidth:P.width,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[o.jsxRuntimeExports.jsx(yp,{name:"companyData.customerSatisfaction",value:Y.customerSatisfaction}),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"bookCloseDate":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[ie?.format(Li.visual.MMMDCommaYYYYformat)??bo.strings.hyphen,Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"reportSent":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),style:{alignItems:"center"},children:[Se&&o.jsxRuntimeExports.jsx(Np,{children:o.jsxRuntimeExports.jsx(t.ZeniDatePickerField,{name:"companyData.reportSent",defaultValue:Y.reportSent})}),!Se&&o.jsxRuntimeExports.jsx(Lp,{reportSent:Y.reportSent,onReportSentClick:ue,hasMonthEndEmailHistory:n}),o.jsxRuntimeExports.jsx(Op,{children:p?o.jsxRuntimeExports.jsx(eu,{isMonthEndReportInDraft:we,bookCloseDate:ie,lastReportSentDate:ye,enableCompanyMonthEndReportBtn:B,handleMonthEndReportPageClick:ce}):o.jsxRuntimeExports.jsx(ds,{isMonthEndReportInDraft:we,bookCloseDate:ie,lastReportSentDate:ye,enableCompanyMonthEndReportBtn:B,isExpenseAutomationEnabledForUser:p,handleMonthEndReportPageClick:ce})}),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"customerSuccessManager":case"preparer":case"reviewer":case"apAnalyst":case"controller":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:`companyData.${P.key}`,value:Y[P.key],placeholderLabel:Ks[P.key],pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"taxStatus":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[o.jsxRuntimeExports.jsx(bp,{name:"companyData.taxStatus",value:Y.taxStatus}),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"taxLead":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:"companyData.taxLead",value:Y.taxLead,placeholderLabel:Ks.taxLead,pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[t.amountToString("0,0",Y.monthlyRecurringRevenue),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);case"annualRecurringRevenue":return o.jsxRuntimeExports.jsxs(tt,{ref:X=>{C(O,P.key,X)},columnWidth:P.width,windowSize:k,isThreadOpen:H||he,isThreadAllowed:P.isThreadAllowed,className:te,onContextMenu:X=>z(X,P.key),children:[t.amountToString("0,0",Y.annualRecurringRevenue),Q({isElementThreadOpen:Be,isElementThreadPresent:Ee,itemKey:P.key,elementThreadId:je,threadStyle:pe?{right:t.Space.sp0}:void 0})]},je);default:return null}})})})})]})},ds=({enableCompanyMonthEndReportBtn:e,isMonthEndReportInDraft:n,isExpenseAutomationEnabledForUser:r,bookCloseDate:i,lastReportSentDate:a,handleMonthEndReportPageClick:d})=>o.jsxRuntimeExports.jsx(t.Button,{size:"small",onClick:d,variant:"primary",label:Jp(e,n,i,a),disabled:!e||r,style:e?{}:{background:"transparent"},prefixIcon:e&&n?o.jsxRuntimeExports.jsx(Gp,{}):void 0}),Dp=s.div`
|
|
781
781
|
display: flex;
|
|
782
782
|
flex-direction: row;
|
|
783
783
|
align-items: center;
|
|
@@ -799,7 +799,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
799
799
|
color: ${e=>e.theme.colors.hero};
|
|
800
800
|
${e=>t.clickableRowStyles(e.theme)}
|
|
801
801
|
|
|
802
|
-
${e=>e.isThreadOpen?
|
|
802
|
+
${e=>e.isThreadOpen?ve.css`
|
|
803
803
|
box-shadow: ${t.Space.sp0} 2px ${t.Space.sp2}
|
|
804
804
|
${e.theme.colors.dropShadowHover};
|
|
805
805
|
border: 1px solid ${e.theme.colors.primary};
|
|
@@ -820,7 +820,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
|
|
823
|
-
${e=>e.isCreationInProgress?
|
|
823
|
+
${e=>e.isCreationInProgress?ve.css`
|
|
824
824
|
border: 1px solid ${e.theme.colors.primary};
|
|
825
825
|
animation: animate 3s linear infinite;
|
|
826
826
|
`:null};
|
|
@@ -931,7 +931,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
931
931
|
width: 12px;
|
|
932
932
|
height: 12px;
|
|
933
933
|
color: ${e=>e.theme.colors.grey5};
|
|
934
|
-
`,Yp=e=>{const n=[];return e.subscriptions.forEach(r=>{r.plan&&n.push(r.plan.plan.zeniSku)}),n},Zp=e=>{const n=[];return e.subscriptions.forEach(r=>{r.addOns.forEach(i=>{i.addOn.zeniSku!=null&&n.push(i.addOn.zeniSku)})}),n};function Xp(e,n){return{companyName:e.company.company.companyInfo.name,companyId:e.company.company.companyInfo.companyId,parentSubsidiaryInfo:e.company.company.parentSubsidiaryInfo,status:{allStatuses:e.company.schema.status,selectedValue:e.company.schema.status.find(r=>r.code===e.company.company.managementInfo.statusCode)},group:{allGroups:e.company.schema.companyGroup,selectedValue:e.company.schema.companyGroup.find(r=>r.id===e.company.company.managementInfo.companyGroupId)},plansAndAddons:wd([...new Set(Yp(e).concat(Zp(e)))]),controller:{allUsers:n,selectedUsers:e.controllers.map(r=>r.user)},customerSuccessManager:{allUsers:n,selectedUsers:e.customerSuccessManagers.map(r=>r.user)},preparer:{allUsers:n,selectedUsers:e.preparers.map(r=>r.user)},reviewer:{allUsers:n,selectedUsers:e.reviewers.map(r=>r.user)},apAnalyst:{allUsers:n,selectedUsers:e.apAnalysts.map(r=>r.user)},reportSent:{showBusinessDay:!0,maxDate:
|
|
934
|
+
`,Yp=e=>{const n=[];return e.subscriptions.forEach(r=>{r.plan&&n.push(r.plan.plan.zeniSku)}),n},Zp=e=>{const n=[];return e.subscriptions.forEach(r=>{r.addOns.forEach(i=>{i.addOn.zeniSku!=null&&n.push(i.addOn.zeniSku)})}),n};function Xp(e,n){return{companyName:e.company.company.companyInfo.name,companyId:e.company.company.companyInfo.companyId,parentSubsidiaryInfo:e.company.company.parentSubsidiaryInfo,status:{allStatuses:e.company.schema.status,selectedValue:e.company.schema.status.find(r=>r.code===e.company.company.managementInfo.statusCode)},group:{allGroups:e.company.schema.companyGroup,selectedValue:e.company.schema.companyGroup.find(r=>r.id===e.company.company.managementInfo.companyGroupId)},plansAndAddons:wd([...new Set(Yp(e).concat(Zp(e)))]),controller:{allUsers:n,selectedUsers:e.controllers.map(r=>r.user)},customerSuccessManager:{allUsers:n,selectedUsers:e.customerSuccessManagers.map(r=>r.user)},preparer:{allUsers:n,selectedUsers:e.preparers.map(r=>r.user)},reviewer:{allUsers:n,selectedUsers:e.reviewers.map(r=>r.user)},apAnalyst:{allUsers:n,selectedUsers:e.apAnalysts.map(r=>r.user)},reportSent:{showBusinessDay:!0,maxDate:ee.dateNow(),date:e.company.company.managementInfo.lastReportSentDate,businessDay:e.company.company.managementInfo.lastReportSentBusinessDay},taxStatus:{allTaxStatuses:e.company.schema.taxStatus,selectedValue:e.company.schema.taxStatus.find(r=>r.code===e.company.company.managementInfo.taxStatusCode)},taxLead:{allUsers:n,selectedUsers:e.taxLeads.map(r=>r.user)},monthlyRecurringRevenue:e.primarySubscription?.summary?.summary.monthlyRecurringRevenue,annualRecurringRevenue:e.primarySubscription?.summary?.summary.annualRecurringRevenue,customerSatisfaction:e.company.company.managementInfo.customerSatisfaction??{customerNote:"",teamNote:""}}}function qp(e,n){const r={};r.users=[];const i=n.split(".")[1];if(Qp(i))return{[i]:e[i]};{const{selectedUsers:a,deSelectedUsers:d}=e[i];return d==null||d?.length==0?a.forEach(l=>{l.isUserSelectionUpdated===!0&&r.users?.push(Gs(i,l.userId,l.isRoleSelected))}):d.forEach(l=>{r.users?.push(Gs(i,l.userId,l.isRoleSelected))}),{users:r.users}}}const Qp=e=>Ip.includes(e);function Gs(e,n,r){switch(e){case"apAnalyst":return{isZeni:!0,role:ee.toUserRoleType("ap_analyst"),userId:n,isSelected:r};case"taxLead":return{isZeni:!0,role:ee.toUserRoleType("tax_lead"),userId:n,isSelected:r};case"customerSuccessManager":return{isZeni:!0,role:ee.toUserRoleType("customer_success_manager"),userId:n,isSelected:r};default:return{isZeni:!0,role:e,userId:n,isSelected:r}}}const Jp=(e,n,r,i)=>{const a=t.appLocale.getLocalizedStrings().dateFormat.visual.MMMMFormat,d=ee.dateNow().subtract(1,"month").format(a),l=ee.dateNow().startOf("month").subtract(1,"day"),c=r?.isSame(l)===!0&&i?.isAfter(r);return e?n?Rp.replace("__month__",d):$p.replace("__month__",d):c===!0?Ep.replace("__month__",d):vp.replace("__month__",d)},eu=({enableCompanyMonthEndReportBtn:e,isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,handleMonthEndReportPageClick:a})=>{const d=ee.dateNow().startOf("month").subtract(1,"day"),l=r?.isSame(d)===!0&&i?.isAfter(r),c=e?n?Tp:wp:l===!0?null:kp;return c!=null?o.jsxRuntimeExports.jsx(t.Tooltip,{display:"block",placement:"bottom",maxWidth:"250",title:c,enterDelay:600,children:o.jsxRuntimeExports.jsx(ds,{isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,enableCompanyMonthEndReportBtn:e,isExpenseAutomationEnabledForUser:!0,handleMonthEndReportPageClick:a})}):o.jsxRuntimeExports.jsx(ds,{isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,enableCompanyMonthEndReportBtn:e,isExpenseAutomationEnabledForUser:!0,handleMonthEndReportPageClick:a})};function tu({companyNameSticky:e,sortConfig:n,onColumnSortConfigChanged:r}){const i=t.useWindowSizeContext(),[a,d]=u.useState(o.cloneDeep(Ct));u.useEffect(()=>{const c=[...a];for(const p of c)p.key===n.sortKey?p.sortOrder=n.sortOrder:p.sortOrder="ascending";d(c)},[n.sortKey,n.sortOrder]);const l=(c,p)=>{let m=p;n.sortKey===c&&(m=p==="ascending"?"descending":"ascending"),r(c,m)};return o.jsxRuntimeExports.jsx(su,{height:Ft,children:a.map(c=>o.jsxRuntimeExports.jsxs(ru,{companyNameSticky:e&&c.key==="companyName",sortDataValue:n.sortKey,actualDataValue:c.key,wrapperWidth:c.width,windowSize:i,children:[o.jsxRuntimeExports.jsxs(lu,{onClick:()=>l(ee.toManagementSortKeyType(c.key),c.sortOrder),children:[o.jsxRuntimeExports.jsx(t.ExtraSmallRegular,{children:c.value}),o.jsxRuntimeExports.jsx(nu,{sortDataValue:n.sortKey,headerdata:c,children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:12,height:12})})]}),o.jsxRuntimeExports.jsx(au,{isVisible:n.sortKey===c.key&&c.key!=="status",children:o.jsxRuntimeExports.jsx(iu,{onClick:()=>l("status","ascending")})})]},c.key))})}const ou=u.memo(tu),nu=s.div`
|
|
935
935
|
display: flex;
|
|
936
936
|
align-items: center;
|
|
937
937
|
transform: ${e=>e.sortDataValue===e.headerdata.key&&e.headerdata.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
@@ -1004,7 +1004,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1004
1004
|
width: ${e=>e.width.valuePx(e.windowSize)};
|
|
1005
1005
|
display: flex;
|
|
1006
1006
|
justify-content: start;
|
|
1007
|
-
`,uu={managementRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},{common:{headers:{comments:mu}},collaboration:{threads:{placeholder:{addANewComment:xu,replyAComment:hu},tooltip:{resolveComment:gu,unResolveComment:Su}}},dateFormat:{analytics:{YYYYDashMMDashDDFormat:Ys}}}=t.appLocale.getLocalizedStrings(),yu=({managementView:e,companiesExcludedFromMonthEndReport:n,showDetailsPageLink:r=!0,loggedInUser:i,loggedInUserRole:a,expenseAutomationEnabledCompanies:d,onColumnSortConfigChanged:l,changeHandlers:c,onCompanyNameClicked:p,onTaskIconClicked:m,onPassportIconClicked:x,onScroll:g,onViewDetailsLinkClicked:h,onMonthEndReportPageClick:C,showMonthEndReportHistoricData:b,initialOpenThreadRequest:S})=>{const y=t.useWindowSizeContext(),j=u.useRef(null),[f,E]=u.useState(null),[$,A]=u.useState(null),{setOpenThread:I,setRequestToOpenThread:
|
|
1007
|
+
`,uu={managementRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},{common:{headers:{comments:mu}},collaboration:{threads:{placeholder:{addANewComment:xu,replyAComment:hu},tooltip:{resolveComment:gu,unResolveComment:Su}}},dateFormat:{analytics:{YYYYDashMMDashDDFormat:Ys}}}=t.appLocale.getLocalizedStrings(),yu=({managementView:e,companiesExcludedFromMonthEndReport:n,showDetailsPageLink:r=!0,loggedInUser:i,loggedInUserRole:a,expenseAutomationEnabledCompanies:d,onColumnSortConfigChanged:l,changeHandlers:c,onCompanyNameClicked:p,onTaskIconClicked:m,onPassportIconClicked:x,onScroll:g,onViewDetailsLinkClicked:h,onMonthEndReportPageClick:C,showMonthEndReportHistoricData:b,initialOpenThreadRequest:S})=>{const y=t.useWindowSizeContext(),j=u.useRef(null),[f,E]=u.useState(null),[$,A]=u.useState(null),{setOpenThread:I,setRequestToOpenThread:w,requestToOpenThread:k,isLoading:N}=u.useContext(t.ThreadsContext);u.useEffect(()=>{S!=null&&e.fetchState==="Completed"&&N===!1&&w(S)},[S,e.fetchState,N,w]);const[D,G]=u.useState(void 0),O=u.useRef(null),Z=u.useRef([]),q=!(y==="small"||y==="medium-compact"),{uiState:R,totalAnnualRecurringRevenue:T,totalMonthlyRecurringRevenue:V}=e,W=R.scrollYOffset??0,v=u.useCallback((F,K,H)=>{const _=e.companies.findIndex(ne=>ne.company.company.companyInfo.companyId===F),oe=Ct.findIndex(ne=>ne.key===K);_!==-1&&oe!==-1&&(Z.current[_]==null?Z.current[_]=[H]:Z.current[_][oe]=H)},[e.companies]),L=u.useCallback(F=>{let K=e.companies[F].company.company.companyInfo.name.length;const H=e.companies[F].company.company.parentSubsidiaryInfo;return H.parentInfo?K+=10:H.subsidiaryInfo&&(K+=15),K>Wt?Le+32:Le},[e.companies]),J=u.useCallback(()=>{O.current=null,w(null)},[w]);u.useEffect(()=>{j.current&&j.current.resetAfterIndex(0)},[e]),u.useEffect(()=>{if(k!=null&&f!=null){const{companyId:F,entityType:K}=k,[H,_]=K.split("."),oe=e.companies.findIndex(ce=>ce.company.company.companyInfo.companyId===F),ne=Ct.findIndex(ce=>ce.key===_);oe!==-1&&!(f.visibleStartIndex<=oe&&f.visibleStopIndex>=oe)&&j.current?.scrollToItem(oe,"center"),setTimeout(()=>{const fe=Z.current[oe]?.[ne];fe!=null&&(O.current={companyId:F,target:fe});const we=Z.current[oe]?.[0]?.getBoundingClientRect().bottom,B=Z.current[oe]?.[0]?.getBoundingClientRect().top;if(we!=null&&B!=null&&(window.innerHeight>=we&&window.innerHeight>=B||B<0)){const Se=Z.current[oe][ne];Se!=null&&(O.current={companyId:F,target:Se}),Z.current[oe][ne]?.scrollIntoView({block:"center",behavior:"auto"})}},0);const le=setInterval(()=>{const ce=Z.current[oe]?.[ne]?.getBoundingClientRect().left,fe=Z.current[oe]?.[ne]?.getBoundingClientRect().right,we=Z.current[oe]?.[ne]?.offsetWidth;if(O.current?.companyId===F&&ce!=null&&we!=null&&fe!=null&&(ce<window.innerWidth-we||fe<window.innerWidth)){clearInterval(le);const B=k.threadId,Se=k.onThreadShownCallback;B&&(w(null),I(k.threadId),Se?.())}},500);setTimeout(()=>{clearInterval(le),w(null)},2e3)}},[k,f,I,w]);const re=u.useMemo(()=>({makeCompanyNameSticky:q,uiState:R,totalAnnualRecurringRevenue:T,totalMonthlyRecurringRevenue:V,onColumnSortConfigChanged:l}),[q,R,T,V,l]);return o.jsxRuntimeExports.jsx(Cu,{children:o.jsxRuntimeExports.jsxs(Ai.Provider,{value:re,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:F,width:K})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:F,innerElementType:Di,itemCount:e.companies.length,itemSize:L,onItemsRendered:H=>E(H),itemData:{managementView:e,loggedInUser:i,loggedInUserRole:a,showDetailsPageLink:r,makeCompanyNameSticky:q,companiesExcludedFromMonthEndReport:n,addThreadRequestThreadId:D,expenseAutomationEnabledCompanies:d,targetElement:O.current?.target,resetTargetElementFromNavigation:J,setElementRef:v,onCompanyNameClicked:p,onPassportIconClicked:x,onTaskIconClicked:m,onMonthEndReportPageClick:C,setAddThreadRequestThreadId:G,changeHandlers:c,setNoteData:A,onViewDetailsLinkClicked:h,showMonthEndReportHistoricData:b},width:K,ref:j,overscanCount:Bt,onScroll:({scrollOffset:H})=>{g?.(H)},initialScrollOffset:W??0,children:fu})}),$!=null?o.jsxRuntimeExports.jsx(Xe.RoomProvider,{id:$.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${$.companyName} ${mu}`,filter:{application:"cockpit",companyId:$.companyId,entityType:$.entityType,isGlobalComment:!1,tab:"management"},isLoading:!1,threadMetadata:{companyName:$.companyName,companyId:$.companyId,entityId:$.companyId,entityType:$.entityType,isGlobalComment:!1,application:"cockpit",tab:"management",url:window.location.href},textOverrides:{composerPlaceholder:xu,replyComposerPlaceholder:hu,threadResolve:gu,threadUnResolve:Su},onThreadClick:F=>null,onCloseAllThreadsDrawer:()=>A(null)})}):null]})})},Ai=u.createContext(void 0),fu=({index:e,style:n,data:r})=>{const i=t.useWindowSizeContext(),{loggedInUserRole:a,showDetailsPageLink:d,addThreadRequestThreadId:l,targetElement:c,setNoteData:p,managementView:m,resetTargetElementFromNavigation:x,setElementRef:g,companiesExcludedFromMonthEndReport:h,makeCompanyNameSticky:C,changeHandlers:b,expenseAutomationEnabledCompanies:S,onCompanyNameClicked:y,onPassportIconClicked:j,onTaskIconClicked:f,onMonthEndReportPageClick:E,onViewDetailsLinkClicked:$,setAddThreadRequestThreadId:A,showMonthEndReportHistoricData:I}=r,w=m.companies[e],{companyId:k}=w.company.company.companyInfo,N=S.includes(k);return o.jsxRuntimeExports.jsx(bu,{style:{...n,width:"fit-content",minWidth:"100%",padding:`${t.Space.sp0} ${uu.managementRightPadding.valuePx(i)} ${t.Space.sp3} ${t.Space.sp0}`},children:o.jsxRuntimeExports.jsx(Ap,{onViewDetailsLinkClicked:$,showDetailsPageLink:d,loggedInUserRole:a,addThreadRequestThreadId:l,targetElementFromNavigation:c,resetTargetElementFromNavigation:x,setNoteData:p,setElementRef:g,isExpenseAutomationEnabledForUser:N,totalHeight:typeof n.height=="number"?n.height:Le,changeHandlers:b,companyView:m.companies[e],hasMonthEndEmailHistory:m.companies[e].hasMonthEndEmailHistory,allUsers:m.zeniUsers.values,companyNameSticky:C,onCompanyNameClicked:y,onPassportIconClicked:j,onTaskIconClicked:f,onMonthEndReportPageClick:E,setAddThreadRequestThreadId:A,companiesExcludedFromMonthEndReport:h,showMonthEndReportHistoricData:I})},k)},Di=u.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:d,uiState:l,totalAnnualRecurringRevenue:c,totalMonthlyRecurringRevenue:p,onColumnSortConfigChanged:m}=u.useContext(Ai);return o.jsxRuntimeExports.jsxs(ju,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(ou,{companyNameSticky:d,onColumnSortConfigChanged:m,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),o.jsxRuntimeExports.jsx(Ru,{children:r}),o.jsxRuntimeExports.jsx(cu,{companyNameSticky:d,totalMRRAmount:t.amountToString("0,0",p),totalARRAmount:t.amountToString("0,0",c)})]})});Di.displayName="Management list view inner element type";const Cu=s.div`
|
|
1008
1008
|
/** Subtract top so list can occupy remaining available height */
|
|
1009
1009
|
height: calc(100vh - 110px);
|
|
1010
1010
|
max-width: 99.9%;
|
|
@@ -1034,14 +1034,14 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1034
1034
|
height: calc(100vh - 45px);
|
|
1035
1035
|
overflow-y: hidden;
|
|
1036
1036
|
background-color: ${e=>e.theme.colors.grey4};
|
|
1037
|
-
`,Pu=({companiesExcludedFromMonthEndReport:e,headerData:n,headerActions:r,managementPageActions:i,managementPageData:a,expenseAutomationEnabledCompanies:d,initialOpenThreadRequest:l})=>{const{managementView:c,loggedInUser:p,loggedInUserRole:m,showDetailsPageLink:x}=a,{onColumnSortConfigChanged:g,changeHandlers:h,onScroll:C,onViewDetailsLinkClicked:b,onCockpitReloadData:S,onCompanyNameClicked:y,onPassportIconClicked:j,onTaskIconClicked:f,onFiltersChange:E,onMonthEndReportPageClick:$,showMonthEndReportHistoricData:A}=i,I=c.uiState.filterText,
|
|
1037
|
+
`,Pu=({companiesExcludedFromMonthEndReport:e,headerData:n,headerActions:r,managementPageActions:i,managementPageData:a,expenseAutomationEnabledCompanies:d,initialOpenThreadRequest:l})=>{const{managementView:c,loggedInUser:p,loggedInUserRole:m,showDetailsPageLink:x}=a,{onColumnSortConfigChanged:g,changeHandlers:h,onScroll:C,onViewDetailsLinkClicked:b,onCockpitReloadData:S,onCompanyNameClicked:y,onPassportIconClicked:j,onTaskIconClicked:f,onFiltersChange:E,onMonthEndReportPageClick:$,showMonthEndReportHistoricData:A}=i,I=c.uiState.filterText,w=c.uiState.filters,k=c.fetchState==="Completed"&&c.zeniUsers.fetchState==="Completed";return r.filterActions&&(r.filterActions.getCategoryWiseOptions=()=>Lu(c)),o.jsxRuntimeExports.jsxs(Tu,{children:[o.jsxRuntimeExports.jsx(dt,{headerActions:{...r},headerData:{...n,filterData:{filterText:I,filters:w},companiesLoaded:k,selectedTabOption:"management",allTabOptions:x===void 0?n.allTabOptions??it:void 0}}),o.jsxRuntimeExports.jsx(Iu,{changeHandlers:h,companiesExcludedFromMonthEndReport:e,expenseAutomationEnabledCompanies:d,initialOpenThreadRequest:l,isFilterApplied:w?.categories!=null,loggedInUser:p,loggedInUserRole:m,managementView:c,onClearFilter:()=>E?.("management",{}),onCockpitReloadData:S,onColumnSortConfigChanged:g,onCompanyNameClicked:y,onMonthEndReportPageClick:$,onPassportIconClicked:j,onScroll:C,onTaskIconClicked:f,onViewDetailsLinkClicked:b,showMonthEndReportHistoricData:A})]})},Iu=({managementView:e,showDetailsPageLink:n=!0,loggedInUser:r,companiesExcludedFromMonthEndReport:i,expenseAutomationEnabledCompanies:a,initialOpenThreadRequest:d,isFilterApplied:l,loggedInUserRole:c,onColumnSortConfigChanged:p,changeHandlers:m,onScroll:x,onViewDetailsLinkClicked:g,onCockpitReloadData:h,onCompanyNameClicked:C,onTaskIconClicked:b,onPassportIconClicked:S,onClearFilter:y,onMonthEndReportPageClick:j,showMonthEndReportHistoricData:f})=>{const E=t.useWindowSizeContext();return e.fetchState==="Error"||e.zeniUsers.fetchState==="Error"?o.jsxRuntimeExports.jsx($t,{onCockpitReloadData:h,selectedCockpitOption:"management"}):e.fetchState==="In-Progress"||e.fetchState==="Not-Started"||e.zeniUsers.fetchState==="In-Progress"||e.zeniUsers.fetchState==="Not-Started"?o.jsxRuntimeExports.jsx(wu,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})}):e.companies.length===0?l?o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchOnFilters,emptySearchTextSecondLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchTextSecondLine,filtersApplied:!0,onClearFilter:y}):o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchTextFirstLine,emptySearchTextSecondLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchTextSecondLine}):o.jsxRuntimeExports.jsx(ku,{windowSize:E,children:o.jsxRuntimeExports.jsx(vu,{showDetailsPageLink:n,onColumnSortConfigChanged:p,changeHandlers:m,onScroll:x,onViewDetailsLinkClicked:g,managementView:e,loggedInUser:r,loggedInUserRole:c,expenseAutomationEnabledCompanies:a,onCompanyNameClicked:C,onTaskIconClicked:b,onPassportIconClicked:S,onMonthEndReportPageClick:j,companiesExcludedFromMonthEndReport:i,showMonthEndReportHistoricData:f,initialOpenThreadRequest:d})})},Lu=e=>{const n=e.zeniUsers.values,r=fi,{companies:i}=e;return r.reduce((a,d)=>{switch(d.value){case"companyGroupId":{if(i.length===0)return{...a,[d.value]:[]};const l=i[0].company.schema.companyGroup.map(c=>{const p=c;return{label:p.name,value:p.id}});return{...a,[d.value]:l}}case"statusCode":{if(i.length===0)return{...a,[d.value]:[]};const l=i[0].company.schema.status.map(c=>{const p=c;return{label:p.name,value:p.code}});return{...a,[d.value]:l}}case"taxStatusCode":{if(i.length===0)return{...a,[d.value]:[]};const l=i[0].company.schema.taxStatus.map(c=>{const p=c;return{label:p.name,value:p.code,avatar:""}});return{...a,[d.value]:l}}case"controllerUserIds":case"apAnalystUserIds":case"preparerUserIds":case"reviewerUserIds":case"taxLeadUserIds":case"customerSuccessManagerUserIds":{const l=n.map(c=>({label:c.firstName||c.lastName?`${c.firstName} ${c.lastName}`:c.email,value:c.userId,photo:c.photo,email:c.email}));return{...a,[d.value]:l}}case"plans":{const l=e.subscriptionPlansZeniSkus.map(c=>({label:c,value:c})).sort((c,p)=>c.label.localeCompare(p.label));return{...a,[d.value]:l}}case"annualRecurringRevenue":return{...a,[d.value]:ol};case"monthlyRecurringRevenue":return{...a,[d.value]:Ss};case"customerSatisfaction":{const l=Object.values(To).map(c=>({label:c.name,value:c.id}));return{...a,[d.value]:l}}case"zeniSatisfaction":{const l=Object.values(eo).map(c=>({label:c.name,value:c.id}));return{...a,[d.value]:l}}default:return{...a,[d.value]:[]}}},{})},Zs=t.appLocale.getLocalizedStrings().cockpit.taskManager.header,{common:Ht}=t.appLocale.getLocalizedStrings(),Ot=[{key:"name",value:Ht.texts.name,sortOrder:"ascending",width:new t.ResponsiveSized(176,176),isThreadAllowed:!0},{key:"taskName",value:Zs.taskName,sortOrder:"ascending",width:new t.ResponsiveSized(320,320),isThreadAllowed:!0},{key:"status",value:Ht.texts.status,sortOrder:"ascending",width:new t.ResponsiveSized(100,100),isThreadAllowed:!0},{key:"priority",value:Ht.texts.priority,sortOrder:"ascending",width:new t.ResponsiveSized(90,90),isThreadAllowed:!0},{key:"dueDate",value:Ht.texts.dueDate,sortOrder:"ascending",width:new t.ResponsiveSized(100,100),isThreadAllowed:!0},{key:"assignee",value:Ht.texts.assignee,sortOrder:"ascending",width:new t.ResponsiveSized(220,220),isThreadAllowed:!0},{key:"tags",value:Zs.tags,sortOrder:"ascending",width:new t.ResponsiveSized(115,115),isThreadAllowed:!0},{key:"createdBy",value:Ht.texts.createdBy,sortOrder:"ascending",width:new t.ResponsiveSized(140,140),isThreadAllowed:!0}];Ot.map(e=>e.key);function Au({sortConfig:e,onColumnSortConfigChanged:n}){const r=t.useWindowSizeContext(),[i,a]=u.useState(o.cloneDeep(Ot));u.useEffect(()=>{const l=[...i];for(const c of l)c.key===e.sortKey?c.sortOrder=e.sortOrder:c.sortOrder="ascending";a(l)},[e.sortKey,e.sortOrder]);const d=(l,c)=>{let p=c;e.sortKey===l&&(p=c==="ascending"?"descending":"ascending"),n(l,p)};return o.jsxRuntimeExports.jsx(Ou,{height:Ft,children:i.map(l=>o.jsxRuntimeExports.jsxs(Nu,{sortDataValue:e.sortKey,actualDataValue:l.key,wrapperWidth:l.width,windowSize:r,children:[o.jsxRuntimeExports.jsxs(Fu,{onClick:()=>d(ee.toTaskManagerSortKeyType(l.key),l.sortOrder),children:[o.jsxRuntimeExports.jsx(t.ExtraSmallRegular,{children:l.value}),o.jsxRuntimeExports.jsx(Du,{sortDataValue:e.sortKey,headerdata:l,children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:12,height:12})})]}),o.jsxRuntimeExports.jsx(zu,{isVisible:e.sortKey===l.key&&l.key!=="dueDate",children:o.jsxRuntimeExports.jsx(Mu,{onClick:()=>d("dueDate","ascending")})})]},l.key))})}const Du=s.div`
|
|
1038
1038
|
display: flex;
|
|
1039
1039
|
align-items: center;
|
|
1040
1040
|
transform: ${e=>e.sortDataValue===e.headerdata.key&&e.headerdata.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
1041
1041
|
|
|
1042
|
-
${e=>e.headerdata.sortOrder==="ascending"?
|
|
1042
|
+
${e=>e.headerdata.sortOrder==="ascending"?ve.css`
|
|
1043
1043
|
padding-top: 2px;
|
|
1044
|
-
`:
|
|
1044
|
+
`:ve.css`
|
|
1045
1045
|
padding-bottom: 2px;
|
|
1046
1046
|
`};
|
|
1047
1047
|
`,Ou=s(t.SmallRegular)`
|
|
@@ -1070,10 +1070,10 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1070
1070
|
box-sizing: border-box;
|
|
1071
1071
|
position: static;
|
|
1072
1072
|
z-index: 0;
|
|
1073
|
-
${e=>e.actualDataValue==="companyName"?
|
|
1073
|
+
${e=>e.actualDataValue==="companyName"?ve.css`
|
|
1074
1074
|
padding-left: ${t.Space.sp4};
|
|
1075
1075
|
flex: 1 1 auto;
|
|
1076
|
-
`:
|
|
1076
|
+
`:ve.css`
|
|
1077
1077
|
padding-left: ${t.Space.sp0};
|
|
1078
1078
|
`};
|
|
1079
1079
|
`,Mu=s(t.SvgCloseRound)`
|
|
@@ -1091,7 +1091,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1091
1091
|
&:hover {
|
|
1092
1092
|
color: ${e=>e.theme.colors.primary};
|
|
1093
1093
|
}
|
|
1094
|
-
`,{dateFormat:Bu,common:{strings:{empty:jn,hyphen:Wu,plus:Lo}}}=t.appLocale.getLocalizedStrings(),_u=({totalHeight:e,task:n,addThreadRequestThreadId:r,setElementRef:i,setAddThreadRequestThreadId:a,onRowClick:d})=>{const l=t.useWindowSizeContext(),c=o.useTheme(),p=n.assignees.length>0?n.assignees[0]:void 0,m=p?.firstName!=null&&p?.lastName!=null?`${p.firstName} ${p.lastName}`:p?.email??jn,{companyId:x,name:g}=n.company.companyInfo,h=n.createdByUser?.firstName!==null&&n.createdByUser?.lastName!=null?`${n.createdByUser.firstName} ${n.createdByUser.lastName}`:n.createdByUser?.email??jn,C=n.assignees.length,b=n.task.id,{openThread:S,threads:y,addThread:j,removeThread:f,setOpenThread:E,setRequestToOpenThread:$}=u.useContext(t.ThreadsContext),A=S!==null?y.get(S):null,I=S?.includes(x)===!0,
|
|
1094
|
+
`,{dateFormat:Bu,common:{strings:{empty:jn,hyphen:Wu,plus:Lo}}}=t.appLocale.getLocalizedStrings(),_u=({totalHeight:e,task:n,addThreadRequestThreadId:r,setElementRef:i,setAddThreadRequestThreadId:a,onRowClick:d})=>{const l=t.useWindowSizeContext(),c=o.useTheme(),p=n.assignees.length>0?n.assignees[0]:void 0,m=p?.firstName!=null&&p?.lastName!=null?`${p.firstName} ${p.lastName}`:p?.email??jn,{companyId:x,name:g}=n.company.companyInfo,h=n.createdByUser?.firstName!==null&&n.createdByUser?.lastName!=null?`${n.createdByUser.firstName} ${n.createdByUser.lastName}`:n.createdByUser?.email??jn,C=n.assignees.length,b=n.task.id,{openThread:S,threads:y,addThread:j,removeThread:f,setOpenThread:E,setRequestToOpenThread:$}=u.useContext(t.ThreadsContext),A=S!==null?y.get(S):null,I=S?.includes(x)===!0,w=S!=null&&y.get(S)==null&&I,k=r!=null&&y.get(r)?.metadata.companyId===x,N=`cockpit_${x}`,D=u.useCallback(()=>{S?.includes(t.NEW_THREAD_SUFFIX)===!0&&f(S),r!=null&&a(void 0)},[r,S,f,a]),G=R=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:R.isElementThreadOpen??!1,isElementThreadPresent:R.isElementThreadPresent??!1,itemKey:R.itemKey,elementThreadId:R.elementThreadId??"",roomId:N,addThreadRequestThreadId:r,openThreadId:S,threadStyle:R.threadStyle,openThreadMetadata:A?.metadata??null,onElementClick:Z,onAddThreadClick:q}),O=u.useCallback(R=>{if(R===S)E(null);else if(y.has(R))E(R);else if(R.includes(t.NEW_THREAD_SUFFIX)){const[T,V]=R.replace(t.NEW_THREAD_SUFFIX,"").split("."),W=_t(Rt(T),ee.toTaskManagerSortKeyType(V),x,g,b);j(R,{type:"thread",visibility:"public",id:R,roomId:N,createdAt:new Date,updatedAt:new Date,comments:[],metadata:W,resolved:!1}),E(R)}},[S,y,E,x,g,b,j,N]),Z=u.useCallback((R,T,V=!1)=>{const W=Ot.find(v=>v.key===T);if($(null),W!=null&&(R.type==="contextmenu"||V===!0)){if(W.isThreadAllowed===!1)return;D(),R.preventDefault(),R.stopPropagation();const v=t.toCollaborationEntityType({tab:"taskManager",key:W.key}),L=[...t.getFilteredThreads(y,{entityType:v,entityId:b,companyId:x},"both")],J=L.length>0&&L[0].length>0?L[0][0]:Pe("taskManager",W.key,x+Lo+b);y.has(J)?O(J):r===J?a(void 0):(a(J),E(null))}},[y,b,x,r,O,a,E,$,D]),q=u.useCallback((R,T)=>{R.stopPropagation();const V=Pe("taskManager",T,x+Lo+b);a(void 0),O(V)},[x,b,a,O]);return o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{$(null),r!=null&&(a(void 0),r.includes(t.NEW_THREAD_SUFFIX)&&f(r))},children:o.jsxRuntimeExports.jsx(Vu,{onClick:()=>d(n.company.companyInfo.primaryEmailDomain,n.task.id),windowSize:l,isThreadOpen:I||k,totalHeight:e,isCreationInProgress:w,children:Ot.map((R,T)=>{const V=t.toCollaborationEntityType({tab:"taskManager",key:R.key}),W=Ot.length-2<=T,v=[...t.getFilteredThreads(y,{entityType:V,entityId:b,companyId:x},"both")],L=v.length>0&&v[0].length>0?v[0][0]:Pe("taskManager",R.key,x+Lo+b),J=y.get(L),re=J!=null&&J.resolved===!1,F=L===S,K=H=>ee.allTaskPriority.find(_=>_.code===H)?.name??jn;switch(R.key){case"name":return o.jsxRuntimeExports.jsxs(yt,{ref:H=>{i(x,R.key,H)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:te,onContextMenu:H=>Z(H,R.key),children:[o.jsxRuntimeExports.jsx(Uu,{children:n.company.companyInfo.name}),G({isElementThreadOpen:F,isElementThreadPresent:re,itemKey:R.key,elementThreadId:L,threadStyle:W?{right:t.Space.sp0}:void 0})]},L);case"taskName":return o.jsxRuntimeExports.jsxs(yt,{ref:H=>{i(x,R.key,H)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:te,onContextMenu:H=>Z(H,R.key),children:[o.jsxRuntimeExports.jsx(t.StandardRegular,{children:n.task.name}),G({isElementThreadOpen:F,isElementThreadPresent:re,itemKey:R.key,elementThreadId:L,threadStyle:W?{right:t.Space.sp0}:void 0})]},L);case"status":return o.jsxRuntimeExports.jsxs(yt,{ref:H=>{i(x,R.key,H)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:te,onContextMenu:H=>Z(H,R.key),children:[t.getRichLabel(n.task.status.code,c),G({isElementThreadOpen:F,isElementThreadPresent:re,itemKey:R.key,elementThreadId:L,threadStyle:W?{right:t.Space.sp0}:void 0})]},L);case"priority":return o.jsxRuntimeExports.jsxs(yt,{ref:H=>{i(x,R.key,H)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:te,onContextMenu:H=>Z(H,R.key),children:[o.jsxRuntimeExports.jsxs(Ku,{children:[o.jsxRuntimeExports.jsx(Gu,{color:t.getLabelColor(n.task.priority.code,c)}),o.jsxRuntimeExports.jsx(t.StandardRegular,{children:K(n.task.priority.code)})]}),G({isElementThreadOpen:F,isElementThreadPresent:re,itemKey:R.key,elementThreadId:L,threadStyle:W?{right:t.Space.sp0}:void 0})]},L);case"dueDate":return o.jsxRuntimeExports.jsxs(yt,{ref:H=>{i(x,R.key,H)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:te,onContextMenu:H=>Z(H,R.key),children:[o.jsxRuntimeExports.jsx(t.StandardRegular,{children:n.task.dueDate!=null?n.task.dueDate.format(Bu.visual.MMMDCommaYYYYformat):Wu}),G({isElementThreadOpen:F,isElementThreadPresent:re,itemKey:R.key,elementThreadId:L,threadStyle:W?{right:t.Space.sp0}:void 0})]},L);case"assignee":return o.jsxRuntimeExports.jsxs(yt,{ref:H=>{i(x,R.key,H)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:te,onContextMenu:H=>Z(H,R.key),children:[o.jsxRuntimeExports.jsx(t.ZeniAvatar,{personBasic:p,styles:{width:t.Space.sp4,height:t.Space.sp4}}),o.jsxRuntimeExports.jsx(Xs,{children:m}),C>1?o.jsxRuntimeExports.jsx(Hu,{children:o.jsxRuntimeExports.jsx(t.SmallRegular,{children:`${Lo}${C-1}`})}):null,G({isElementThreadOpen:F,isElementThreadPresent:re,itemKey:R.key,elementThreadId:L,threadStyle:W?{right:t.Space.sp0}:void 0})]},L);case"tags":return o.jsxRuntimeExports.jsxs(yt,{ref:H=>{i(x,R.key,H)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:te,onContextMenu:H=>Z(H,R.key),children:[n.task.tagIds.length>0?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:t.getTagLabel(n.task.tagIds,n.tags)}):null,G({isElementThreadOpen:F,isElementThreadPresent:re,itemKey:R.key,elementThreadId:L,threadStyle:W?{right:t.Space.sp0}:void 0})]},L);case"createdBy":return o.jsxRuntimeExports.jsxs(yt,{ref:H=>{i(x,R.key,H)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:te,onContextMenu:H=>Z(H,R.key),children:[o.jsxRuntimeExports.jsx(t.ZeniAvatar,{personBasic:n.createdByUser,styles:{width:t.Space.sp4,height:t.Space.sp4}}),o.jsxRuntimeExports.jsx(Xs,{children:h}),G({isElementThreadOpen:F,isElementThreadPresent:re,itemKey:R.key,elementThreadId:L,threadStyle:W?{right:t.Space.sp0}:void 0})]},L);default:return null}})})})},Vu=s.div`
|
|
1095
1095
|
display: flex;
|
|
1096
1096
|
min-width: 100%;
|
|
1097
1097
|
flex-direction: row;
|
|
@@ -1115,7 +1115,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1115
1115
|
border-radius: ${t.Space.sp2};
|
|
1116
1116
|
color: ${e=>e.theme.colors.hero};
|
|
1117
1117
|
|
|
1118
|
-
${e=>e.isThreadOpen?
|
|
1118
|
+
${e=>e.isThreadOpen?ve.css`
|
|
1119
1119
|
box-shadow: ${t.Space.sp0} 2px ${t.Space.sp2}
|
|
1120
1120
|
${e.theme.colors.dropShadowHover};
|
|
1121
1121
|
border: 1px solid ${e.theme.colors.primary};
|
|
@@ -1136,7 +1136,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1136
1136
|
}
|
|
1137
1137
|
}
|
|
1138
1138
|
|
|
1139
|
-
${e=>e.isCreationInProgress?
|
|
1139
|
+
${e=>e.isCreationInProgress?ve.css`
|
|
1140
1140
|
border: 1px solid ${e.theme.colors.primary};
|
|
1141
1141
|
animation: animate 3s linear infinite;
|
|
1142
1142
|
`:null};
|
|
@@ -1178,7 +1178,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1178
1178
|
height: ${t.Space.sp3};
|
|
1179
1179
|
color: ${e=>e.color};
|
|
1180
1180
|
margin-right: ${t.Space.sp2};
|
|
1181
|
-
`,Oi=u.createContext(void 0),Ni=u.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{uiState:d,onColumnSortConfigChanged:l}=u.useContext(Oi);return o.jsxRuntimeExports.jsxs(Mi,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(Au,{onColumnSortConfigChanged:l,sortConfig:{sortKey:d.sortKey,sortOrder:d.sortOrder}}),o.jsxRuntimeExports.jsx(Xu,{children:r})]})});Ni.displayName="Task manager list view inner element type";const Yu=({companyTaskManagerView:e,fetchNextItemsOnScroll:n,onColumnSortConfigChanged:r,onRowClick:i,initialOpenThreadRequest:a})=>{const{uiState:d,fetchState:l}=e,c=u.useRef(null),[p,m]=u.useState(null),x=u.useMemo(()=>({uiState:e.uiState,onColumnSortConfigChanged:r}),[e.uiState,r]),{setOpenThread:g,setRequestToOpenThread:h,requestToOpenThread:C,isLoading:b}=u.useContext(t.ThreadsContext);u.useEffect(()=>{a!=null&&e.fetchState==="Completed"&&b===!1&&h(a)},[a,e.fetchState,b,h]);const[S,y]=u.useState(void 0),j=u.useRef([]),f=u.useCallback(I=>e.tasksList[I].company.companyInfo.name.length>Wt?
|
|
1181
|
+
`,Oi=u.createContext(void 0),Ni=u.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{uiState:d,onColumnSortConfigChanged:l}=u.useContext(Oi);return o.jsxRuntimeExports.jsxs(Mi,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(Au,{onColumnSortConfigChanged:l,sortConfig:{sortKey:d.sortKey,sortOrder:d.sortOrder}}),o.jsxRuntimeExports.jsx(Xu,{children:r})]})});Ni.displayName="Task manager list view inner element type";const Yu=({companyTaskManagerView:e,fetchNextItemsOnScroll:n,onColumnSortConfigChanged:r,onRowClick:i,initialOpenThreadRequest:a})=>{const{uiState:d,fetchState:l}=e,c=u.useRef(null),[p,m]=u.useState(null),x=u.useMemo(()=>({uiState:e.uiState,onColumnSortConfigChanged:r}),[e.uiState,r]),{setOpenThread:g,setRequestToOpenThread:h,requestToOpenThread:C,isLoading:b}=u.useContext(t.ThreadsContext);u.useEffect(()=>{a!=null&&e.fetchState==="Completed"&&b===!1&&h(a)},[a,e.fetchState,b,h]);const[S,y]=u.useState(void 0),j=u.useRef([]),f=u.useCallback(I=>e.tasksList[I].company.companyInfo.name.length>Wt?Le+32:Le,[e.tasksList]),E=u.useCallback(I=>I<e.tasksList.length,[e.tasksList.length]),$=u.useCallback(()=>{d.from!=null&&l==="Completed"&&n()},[n,l,d.from]);u.useEffect(()=>{c.current&&c.current.resetAfterIndex(0)},[e]);const A=u.useCallback((I,w,k)=>{const N=e.tasksList.findIndex(G=>G.company.companyInfo.companyId===I),D=Ot.findIndex(G=>G.key===w);N!==-1&&D!==-1&&(j.current[N]==null?j.current[N]=[k]:j.current[N][D]=k)},[e.tasksList]);return u.useEffect(()=>{if(C!=null&&p!=null){const{companyId:I,entityType:w}=C,[k,N]=w.split("."),D=e.tasksList.findIndex(q=>q.company.companyInfo.companyId===I),G=Ot.findIndex(q=>q.key===N);D!==-1&&!(p.visibleStartIndex<=D&&p.visibleStopIndex>=D)&&c.current?.scrollToItem(D,"center"),setTimeout(()=>{const q=j.current[D]?.[0]?.getBoundingClientRect().bottom,R=j.current[D]?.[0]?.getBoundingClientRect().top;q!=null&&R!=null&&(window.innerHeight>=q&&window.innerHeight>=R||R<0)&&j.current[D][G]?.scrollIntoView({block:"center",behavior:"auto"})},0);const Z=setInterval(()=>{const q=j.current[D]?.[G]?.getBoundingClientRect().left,R=j.current[D]?.[G]?.getBoundingClientRect().right,T=j.current[D]?.[G]?.offsetWidth;if(q!=null&&T!=null&&R!=null&&(q<window.innerWidth-T||R<window.innerWidth)){clearInterval(Z);const V=C.threadId,W=C.onThreadShownCallback;V&&(h(null),g(C.threadId),W?.())}},500);setTimeout(()=>{clearInterval(Z),h(null)},2e3)}},[C,p,g,h]),o.jsxRuntimeExports.jsx(Qu,{children:o.jsxRuntimeExports.jsx(Oi.Provider,{value:x,children:o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:I,width:w})=>o.jsxRuntimeExports.jsx(Mi,{style:{height:I,width:w},children:o.jsxRuntimeExports.jsx(o.InfiniteLoader,{isItemLoaded:E,itemCount:e.tasksList.length+1,loadMoreItems:$,children:({onItemsRendered:k})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:I,innerElementType:Ni,itemCount:e.tasksList.length,itemSize:f,itemData:{companyTaskManagerView:e,addThreadRequestThreadId:S,setElementRef:A,setAddThreadRequestThreadId:y,onRowClick:i},width:w,ref:c,onItemsRendered:N=>{m(N),k(N)},overscanCount:Bt,children:Zu})})})})})})},Zu=({index:e,style:n,data:r})=>{const i=r.companyTaskManagerView,{addThreadRequestThreadId:a,setElementRef:d,setAddThreadRequestThreadId:l,onRowClick:c}=r,p=i.tasksList[e];return o.jsxRuntimeExports.jsx(qu,{style:{...n,width:"fit-content",minWidth:"100%"},children:o.jsxRuntimeExports.jsx(_u,{totalHeight:typeof n.height=="number"?n.height:Le,addThreadRequestThreadId:a,setElementRef:d,setAddThreadRequestThreadId:l,task:p,onRowClick:c})},p.task.id)},Mi=s.div``,Xu=s.div`
|
|
1182
1182
|
position: relative;
|
|
1183
1183
|
width: auto;
|
|
1184
1184
|
height: 100%;
|
|
@@ -1192,7 +1192,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1192
1192
|
min-height: 100%;
|
|
1193
1193
|
flex-direction: column;
|
|
1194
1194
|
width: 100%;
|
|
1195
|
-
`,{cockpit:ps}=t.appLocale.getLocalizedStrings(),Ju=({headerActions:e,headerData:n,isBirdsEyeViewEnabled:r,initialOpenThreadRequest:i,taskManagerPageData:a,taskManagerPageActions:d})=>{const{companyTaskManagerView:l}=a,{uiState:c}=l,{onCockpitReloadData:p,onFetchTaskManagerView:m,onRowClick:x}=d,g=l.fetchState==="Completed",{filters:h}=l.uiState,[C,b]=u.useState(l.uiState.filterText??""),S=()=>{m(c.from,c.sortKey,c.sortOrder,!0,c.filterText)},y=(E,$)=>{m(c.from,E,$,!1,c.filterText,h)},j=u.useRef(o.debounce(E=>m(c.from,c.sortKey,c.sortOrder,!1,E,h),500,{trailing:!0})).current,f=(E,$)=>{b($);const A=$.trim();A.length>=2?j(A):j("")};return e.filterActions&&(e.filterActions.getCategoryWiseOptions=()=>tm(l)),o.jsxRuntimeExports.jsxs(om,{children:[o.jsxRuntimeExports.jsx(dt,{headerActions:{...e,filterActions:{...e.filterActions,onFilterTextChanged:f}},headerData:{...n,allTabOptions:n.allTabOptions??it,selectedTabOption:"taskManager",companiesLoaded:g,filterData:{filterText:C,filters:h}}}),r?o.jsxRuntimeExports.jsx(rm,{metrics:l.metrics}):null,o.jsxRuntimeExports.jsx(em,{companyTaskManagerView:l,fetchNextItemsOnScroll:S,initialOpenThreadRequest:i,onCockpitReloadData:p,onColumnSortConfigChanged:y,onRowClick:x})]})},em=({companyTaskManagerView:e,fetchNextItemsOnScroll:n,initialOpenThreadRequest:r,onCockpitReloadData:i,onColumnSortConfigChanged:a,onRowClick:d})=>{const l=t.useWindowSizeContext();return e.fetchState==="Error"&&e.tasksList.length===0?o.jsxRuntimeExports.jsx($t,{selectedCockpitOption:"taskManager",onCockpitReloadData:i}):e.fetchState==="Not-Started"||e.fetchState==="In-Progress"&&e.tasksList.length===0?o.jsxRuntimeExports.jsx(nm,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})}):e.fetchState==="Completed"&&e.tasksList.length===0?o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:ps.emptySearchTextFirstLine,emptySearchTextSecondLine:ps.emptySearchTextSecondLine,filtersApplied:!1}):o.jsxRuntimeExports.jsx(sm,{windowSize:l,children:o.jsxRuntimeExports.jsx(Yu,{companyTaskManagerView:e,fetchNextItemsOnScroll:n,initialOpenThreadRequest:r,onColumnSortConfigChanged:a,onRowClick:d})})},tm=e=>{const n=Ei,r=new Map;for(const i of e.tasksList)for(const a of i.tags)r.has(a.tagId)||r.set(a.tagId,a);return n.reduce((i,a)=>{switch(a.value){case"company_id":{const d=(e.companies??[]).map(l=>({label:l.companyInfo.name,value:l.companyInfo.companyId}));return{...i,[a.value]:d}}case"assignees":{const d=(e.users??[]).map(l=>({label:l?.firstName||l?.lastName?`${l?.firstName} ${l?.lastName}`:l?.email??"",value:l.userId,photo:l?.photo,email:l?.email}));return{...i,[a.value]:d}}case"status":return{...i,[a.value]:
|
|
1195
|
+
`,{cockpit:ps}=t.appLocale.getLocalizedStrings(),Ju=({headerActions:e,headerData:n,isBirdsEyeViewEnabled:r,initialOpenThreadRequest:i,taskManagerPageData:a,taskManagerPageActions:d})=>{const{companyTaskManagerView:l}=a,{uiState:c}=l,{onCockpitReloadData:p,onFetchTaskManagerView:m,onRowClick:x}=d,g=l.fetchState==="Completed",{filters:h}=l.uiState,[C,b]=u.useState(l.uiState.filterText??""),S=()=>{m(c.from,c.sortKey,c.sortOrder,!0,c.filterText)},y=(E,$)=>{m(c.from,E,$,!1,c.filterText,h)},j=u.useRef(o.debounce(E=>m(c.from,c.sortKey,c.sortOrder,!1,E,h),500,{trailing:!0})).current,f=(E,$)=>{b($);const A=$.trim();A.length>=2?j(A):j("")};return e.filterActions&&(e.filterActions.getCategoryWiseOptions=()=>tm(l)),o.jsxRuntimeExports.jsxs(om,{children:[o.jsxRuntimeExports.jsx(dt,{headerActions:{...e,filterActions:{...e.filterActions,onFilterTextChanged:f}},headerData:{...n,allTabOptions:n.allTabOptions??it,selectedTabOption:"taskManager",companiesLoaded:g,filterData:{filterText:C,filters:h}}}),r?o.jsxRuntimeExports.jsx(rm,{metrics:l.metrics}):null,o.jsxRuntimeExports.jsx(em,{companyTaskManagerView:l,fetchNextItemsOnScroll:S,initialOpenThreadRequest:i,onCockpitReloadData:p,onColumnSortConfigChanged:y,onRowClick:x})]})},em=({companyTaskManagerView:e,fetchNextItemsOnScroll:n,initialOpenThreadRequest:r,onCockpitReloadData:i,onColumnSortConfigChanged:a,onRowClick:d})=>{const l=t.useWindowSizeContext();return e.fetchState==="Error"&&e.tasksList.length===0?o.jsxRuntimeExports.jsx($t,{selectedCockpitOption:"taskManager",onCockpitReloadData:i}):e.fetchState==="Not-Started"||e.fetchState==="In-Progress"&&e.tasksList.length===0?o.jsxRuntimeExports.jsx(nm,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})}):e.fetchState==="Completed"&&e.tasksList.length===0?o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:ps.emptySearchTextFirstLine,emptySearchTextSecondLine:ps.emptySearchTextSecondLine,filtersApplied:!1}):o.jsxRuntimeExports.jsx(sm,{windowSize:l,children:o.jsxRuntimeExports.jsx(Yu,{companyTaskManagerView:e,fetchNextItemsOnScroll:n,initialOpenThreadRequest:r,onColumnSortConfigChanged:a,onRowClick:d})})},tm=e=>{const n=Ei,r=new Map;for(const i of e.tasksList)for(const a of i.tags)r.has(a.tagId)||r.set(a.tagId,a);return n.reduce((i,a)=>{switch(a.value){case"company_id":{const d=(e.companies??[]).map(l=>({label:l.companyInfo.name,value:l.companyInfo.companyId}));return{...i,[a.value]:d}}case"assignees":{const d=(e.users??[]).map(l=>({label:l?.firstName||l?.lastName?`${l?.firstName} ${l?.lastName}`:l?.email??"",value:l.userId,photo:l?.photo,email:l?.email}));return{...i,[a.value]:d}}case"status":return{...i,[a.value]:ee.allTaskStatus.map(d=>({label:d.name,value:d.code}))};case"priority":return{...i,[a.value]:ee.allTaskPriority.map(d=>({label:d.name,value:d.code}))};case"tag":{const d=Array.from(r.values()).map(l=>({label:l.name,value:l.tagId}));return{...i,[a.value]:d}}default:return{...i,[a.value]:[]}}},{})},om=s.div`
|
|
1196
1196
|
height: calc(100vh - 60px);
|
|
1197
1197
|
overflow-y: hidden;
|
|
1198
1198
|
display: flex;
|
|
@@ -1318,7 +1318,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1318
1318
|
left: 19%;
|
|
1319
1319
|
position: absolute;
|
|
1320
1320
|
background-color: ${e=>e.theme.colors.primary};
|
|
1321
|
-
`,{dateFormat:qs,timeFormat:vm,timeframe:rt,common:wm}=t.appLocale.getLocalizedStrings(),bn=e=>{if(e!=null){const n=J.dateNow();return Math.abs(n.diff(e,"days"))}};function vo(e){if(e==null)return;const n=J.dateNow();if(Math.abs(n.diff(e,"days"))<=0)return`0 ${rt.day}`;const[i,a]=e<n?[e,n]:[n,e],d=i.year(),l=i.month(),c=i.date(),p=a.year(),m=a.month(),x=a.date();let g=p-d,h=m-l,C=x-c;if(C<0){h--;const S=new Date(p,m,0);C+=S.getDate()}h<0&&(g--,h+=12);const b=[];return g>0&&b.push(`${g} ${g>1?rt.year:rt.year.slice(0,-1)}`),h>0&&b.push(`${h} ${h>1?rt.month:rt.month.slice(0,-1)}`),C>0&&b.push(`${C} ${C>1?rt.day:rt.day.slice(0,-1)}`),b.join(", ")}function Wi(e){if(e==null)return wm.strings.hyphen;const n=Math.floor(Number(e)/12),r=Number(e)%12,i=n>1?rt.year:rt.year.slice(0,-1),a=r>1?rt.month:rt.month.slice(0,-1);return n===0?`${e} ${a}`:r===0?`${n} ${i}`:`${n} ${i}, ${r} ${a}`}const _i=e=>({name:e?.companyInfo.name??"",productVerticals:e?.companyHealthMetric.verticalProductServices??void 0,runway:e?.companyHealthMetric.runway,churnProbabilityPercentage:e?.companyHealthMetric.churnProbabilityPercentage,netPromoterScore:e?.companyHealthMetric.netPromoterScore,customerSatisfactionScore:e?.companyHealthMetric.customerSatisfactionScore,lastReportSent:e?.managementInfo.lastReportSentDate!=null?vo(J.zeniDate(e?.managementInfo.lastReportSentDate.toISOString())):void 0,dashboardLastVisit:e?.companyHealthMetric.customerLastDashboardVisit!=null?J.zeniDate(e?.companyHealthMetric.customerLastDashboardVisit.toISOString()).format(qs.visual.MMMDCommaYYYYformat):void 0,companyEngagementMetricsUpdatedAt:e?.companyHealthMetric.companyEngagementMetricsUpdatedAt!=null?{date:J.zeniDate(e?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(qs.visual.MMMDCommaYYYYformat),time:J.zeniDate(e?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(vm.hhmmAFormat)}:void 0,noOfVerticalsEnabled:e?.noOfProductVerticalsEnabled,renewalDate:e?.companyHealthMetric.subscriptionRenewalDate!=null?vo(J.zeniDate(e?.companyHealthMetric.subscriptionRenewalDate.toISOString())):void 0,lastEngagements:e!=null?e.companyHealthMetric.lastEngagements:[],additionalChurnFactors:e!=null?e.companyHealthMetric.additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]},updatedByUserName:e?.companyHealthMetric.updatedByUser!=null?t.getFullName(e.companyHealthMetric.updatedByUser):void 0}),_e=t.appLocale.getLocalizedStrings().cockpit.health.header,Nt=[{key:"companyName",value:_e.name,sortOrder:"ascending",width:new t.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"churnProbability",value:_e.churnProbability,sortOrder:"ascending",width:new t.ResponsiveSized(380,380),isThreadAllowed:!0},{key:"controller",value:_e.controller,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"customerSuccessManager",value:_e.customerSuccessManager,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"lastEngagement",value:_e.lastEngagement,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"companyEngagementMetricsUpdatedAt",value:_e.companyEngagementMetricsUpdatedAt,sortOrder:"ascending",width:new t.ResponsiveSized(160,160),isThreadAllowed:!0},{key:"runway",value:_e.runway,sortOrder:"ascending",width:new t.ResponsiveSized(220,220),isThreadAllowed:!0},{key:"netPromoterScore",value:_e.netPromoterScore,sortOrder:"ascending",width:new t.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"customerSatisfactionScore",value:_e.customerSatisfactionScore,sortOrder:"ascending",width:new t.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"lastReportSent",value:_e.lastReportSent,sortOrder:"ascending",width:new t.ResponsiveSized(250,250),isThreadAllowed:!0},{key:"dashboardLastSeen",value:_e.dashboardLastSeen,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"subscriptionDate",value:_e.subscriptionDate,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"renewalDate",value:_e.renewalDate,sortOrder:"ascending",width:new t.ResponsiveSized(180,180),isThreadAllowed:!0},{key:"group",value:_e.group,sortOrder:"ascending",width:new t.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:_e.monthlyRecurringRevenue,sortOrder:"ascending",width:new t.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"externalProductServiceExposure",value:_e.externalProductServiceExposure,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"productVerticals",value:_e.productVerticals,sortOrder:"ascending",width:new t.ResponsiveSized(360,360),isThreadAllowed:!0}];Nt.map(e=>e.key);const Vi=e=>le.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},le.createElement("path",{d:"M10.1094 4H2.3764C2.16286 4 1.98975 4.22386 1.98975 4.5V11.5C1.98975 11.7761 2.16286 12 2.3764 12H10.1094C10.323 12 10.4961 11.7761 10.4961 11.5V4.5C10.4961 4.22386 10.323 4 10.1094 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M11.0046 7L14.0046 5V11L11.0046 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}));function km({companyView:e,healthView:n,companyNameSticky:r,totalHeight:i,addThreadRequestThreadId:a,setNoteData:d,setElementRef:l,setAddThreadRequestThreadId:c,onRowClick:p}){const m=t.useWindowSizeContext(),x=t.appLocale.getLocalizedStrings(),{common:{strings:{hyphen:g,backspace:h,space:C,colon:b,dot:S}},cockpit:{health:{detailPage:{churnProbabilityTexts:{churnProbability:y,for:j,is:f,percent:E},notApplicable:$},common:{engagementTypes:A,labels:{lastEngagements:I,factorsThatDecreaseChurnProbability:v,factorsThatIncreaseChurnProbability:w}}}},dateFormat:F}=x,{companyInfo:{companyId:D,name:K},companyHealthMetric:M,controllers:G,managementInfo:{lastReportSentDate:q,customerSuccessManagerUserIds:R}}=e,L=_i(e),k=n.zeniUsers.values.filter(O=>R.includes(O.userId)),P=`cockpit_${D}`,N="healthMonitor.notes",{threads:Q,isLoading:ae}=t.useFilteredThreads({entityType:N,companyId:D},!1),z={name:K,companyId:D,companyGroup:e.companyGroup!=null?e.companyGroup.find(O=>O.id===e.managementInfo.companyGroupId):void 0,monthlyRecurringRevenue:e.monthlyRecurringRevenue,productVerticals:M.verticalProductServices,runway:M.runway,churnProbabilityPercentage:M.churnProbabilityPercentage,netPromoterScore:M.netPromoterScore,customerSatisfactionScore:M.customerSatisfactionScore,controllers:G.map(O=>J.getUserName(O)),customerSuccessManagers:k.map(O=>J.getUserName(O)),lastReportSent:q!=null?J.zeniDate(q.toISOString()):void 0,subscriptionStartDate:M.subscriptionStartDate!=null?J.zeniDate(M.subscriptionStartDate.toISOString()).format(F.visual.MMMDCommaYYYYformat):void 0,renewalDate:M.subscriptionRenewalDate!=null?J.zeniDate(M.subscriptionRenewalDate.toISOString()):void 0,companyEngagementMetricsUpdatedAt:M.companyEngagementMetricsUpdatedAt,externalProductServiceExposure:M.externalProductServiceExposure},{openThread:Y,threads:T,addThread:te,removeThread:re,setOpenThread:Z,setRequestToOpenThread:ie}=u.useContext(t.ThreadsContext),ne=Y!==null?T.get(Y):null,xe=Y?.includes(D)===!0,ye=Y!=null&&T.get(Y)==null&&xe,$e=a!=null&&T.get(a)?.metadata.companyId===D,V=u.useCallback(()=>{Y?.includes(t.NEW_THREAD_SUFFIX)===!0&&re(Y),a!=null&&c(void 0)},[a,Y,re,c]),ee=u.useCallback(O=>{if(O===Y)Z(null);else if(T.has(O))Z(O);else if(O.includes(t.NEW_THREAD_SUFFIX)){const[ke,B]=O.replace(t.NEW_THREAD_SUFFIX,"").split("."),de=_t(Rt(ke),J.toHealthSortKeyType(B),D,K);te(O,{type:"thread",visibility:"public",id:O,roomId:P,createdAt:new Date,updatedAt:new Date,comments:[],metadata:de,resolved:!1}),Z(O)}},[D,K,Y,T,te,Z,P]),ge=u.useCallback((O,ke,B=!1)=>{const de=Nt.find(je=>je.key===ke);if(ie(null),de!=null&&(O.type==="contextmenu"||B===!0)){if(de.isThreadAllowed===!1)return;V(),O.preventDefault(),O.stopPropagation();const je=t.toCollaborationEntityType({tab:"healthMonitor",key:de.key}),U=[...t.getFilteredThreads(T,{entityType:je,companyId:D},"both")],_=U.length>0&&U[0].length>0?U[0][0]:Pe("healthMonitor",de.key,D);T.has(_)?ee(_):a===_?c(void 0):(c(_),Z(null))}},[T,D,a,ee,c,Z,ie,V]),ve=u.useCallback((O,ke)=>{O.stopPropagation();const B=Pe("healthMonitor",ke,D);c(void 0),ee(B)},[D,c,ee]),Ce=O=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:O.isElementThreadOpen??!1,isElementThreadPresent:O.isElementThreadPresent??!1,itemKey:O.itemKey,elementThreadId:O.elementThreadId??"",roomId:P,addThreadRequestThreadId:a,openThreadId:Y,threadStyle:O.threadStyle,openThreadMetadata:ne?.metadata??null,onElementClick:ge,onAddThreadClick:ve});return o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{ie(null),a!=null&&(c(void 0),a.includes(t.NEW_THREAD_SUFFIX)&&re(a))},children:o.jsxRuntimeExports.jsx(Tm,{windowSize:m,isThreadOpen:xe||$e,totalHeight:i,isCreationInProgress:ye,"data-testid":t.generateDataTestId("health-monitor-row",D),onClick:()=>p(z.companyId),children:Nt.map((O,ke)=>{const B=t.toCollaborationEntityType({tab:"healthMonitor",key:O.key}),de=Nt.length-2<=ke,je=[...t.getFilteredThreads(T,{entityType:B,companyId:D},"both")],U=je.length>0&&je[0].length>0?je[0][0]:Pe("healthMonitor",O.key,D),_=T.get(U),ce=_!=null&&_.resolved===!1,Se=U===Y,fe=a===U,Ie=L.lastEngagements;switch(O.key){case"companyName":return o.jsxRuntimeExports.jsxs(Am,{companyNameSticky:r,columnWidth:O.width,windowSize:m,isThreadOpen:Se||fe,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-company-name",D),onContextMenu:H=>ge(H,O.key),ref:H=>{l(D,O.key,H)},children:[o.jsxRuntimeExports.jsxs(Nm,{"data-testid":t.generateDataTestId("health-monitor-row-company-name-text",D),children:[z.name,o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:Se,roomId:P,openThreadId:Y,openThreadMetadata:ne?.metadata??null})]}),o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`2px ${t.Space.sp2}`},title:"Notes",children:o.jsxRuntimeExports.jsxs(zm,{className:"notesIcon","data-testid":t.generateDataTestId("health-monitor-row-notes-icon",D),onClick:H=>{H.preventDefault(),H.stopPropagation(),d({roomId:P,companyId:D,companyName:K,entityType:N})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:Q.length,isLoading:ae}),o.jsxRuntimeExports.jsx(Fm,{})]})}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:ce,itemKey:O.key,style:{left:t.Space.sp4},onElementClick:ge}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Pe("healthMonitor",O.key,D),addThreadRequestThreadId:a,itemKey:O.key,onAddThreadClick:ve})]},U);case"productVerticals":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-product-verticals",D),onContextMenu:H=>ge(H,O.key),children:[o.jsxRuntimeExports.jsx(Ui,{productVerticals:M.verticalProductServices,testIdSuffix:D}),Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"runway":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-runway",D),onContextMenu:H=>ge(H,O.key),children:[z.runway!=null?J.isCompanyRunwayInfinite(z.runway)===!0?o.jsxRuntimeExports.jsx(Bm,{"data-testid":t.generateDataTestId("health-monitor-row-runway-infinity",D)}):Wi(z.runway.runwayMonths):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:g}),Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"churnProbability":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-churn-probability",D),onContextMenu:H=>ge(H,O.key),children:[o.jsxRuntimeExports.jsx(Mm,{"data-testid":t.generateDataTestId("health-monitor-row-churn-meter",D),children:o.jsxRuntimeExports.jsx(Bi,{percentage:z.churnProbabilityPercentage,barHeight:12})}),L.churnProbabilityPercentage!=null?o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`,textAlign:"left"},title:o.jsxRuntimeExports.jsxs(Vm,{children:[o.jsxRuntimeExports.jsx(Um,{children:`${y} ${j} ${e.companyInfo.name} ${f} ${Math.round(L.churnProbabilityPercentage??0)}${E}${S}`}),e.companyHealthMetric.churnProbabilityReason.length!==0||e.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(Js,{children:[o.jsxRuntimeExports.jsxs(er,{children:[w,b]}),o.jsxRuntimeExports.jsxs(tr,{children:[e.companyHealthMetric.churnProbabilityReason.map((H,ue)=>o.jsxRuntimeExports.jsx($n,{children:o.jsxRuntimeExports.jsx(En,{children:H.text})},`${o.nanoid()}_${ue}}`)),e.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((H,ue)=>o.jsxRuntimeExports.jsx($n,{children:o.jsxRuntimeExports.jsx(En,{children:H.value})},`${o.nanoid()}_${ue}}`))]})]}):null,e.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(Js,{children:[o.jsxRuntimeExports.jsxs(er,{children:[v,b]}),o.jsxRuntimeExports.jsx(tr,{children:e.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((H,ue)=>o.jsxRuntimeExports.jsx($n,{children:o.jsxRuntimeExports.jsx(En,{children:H.value})},`${o.nanoid()}_${ue}}`))})]}):null]}),children:o.jsxRuntimeExports.jsx(_m,{"data-testid":t.generateDataTestId("health-monitor-row-churn-info-icon",D),style:{marginTop:t.Space.sp1,marginLeft:t.Space.sp1,marginRight:t.Space.sp0}})}):null,Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"customerSatisfactionScore":case"netPromoterScore":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId(`health-monitor-row-${O.key==="netPromoterScore"?"nps":"csat"}`,D),onContextMenu:H=>ge(H,O.key),children:[z[O.key]!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Om,{children:z[O.key]}),o.jsxRuntimeExports.jsx(Dm,{children:h}),O.key==="netPromoterScore"?o.jsxRuntimeExports.jsxs(Qs,{children:[" ",Ja," "]}):o.jsxRuntimeExports.jsxs(Qs,{children:[" ",el," "]})]}):z.churnProbabilityPercentage!=null?$:g,Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"controller":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-controller",D),onContextMenu:H=>ge(H,O.key),children:[o.jsxRuntimeExports.jsx(t.Tooltip,{enterDelay:600,style:{padding:`2px ${t.Space.sp2}`},title:z.controllers.join(", "),children:z.controllers[0]}),Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"customerSuccessManager":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-csm",D),onContextMenu:H=>ge(H,O.key),children:[o.jsxRuntimeExports.jsx(t.Tooltip,{enterDelay:600,style:{padding:`2px ${t.Space.sp2}`,textAlign:"left"},maxWidth:"300px",title:z.customerSuccessManagers.join(", "),children:z.customerSuccessManagers[0]}),Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"lastReportSent":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-last-report-sent",D),onContextMenu:H=>ge(H,O.key),children:[o.jsxRuntimeExports.jsx(Rn,{children:z.lastReportSent!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:vo(z.lastReportSent)}),o.jsxRuntimeExports.jsx(t.SmallRegular,{children:z.lastReportSent.format(F.visual.MMMDCommaYYYYformat)})]}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:g})}),Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"renewalDate":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-renewal-date",D),onContextMenu:H=>ge(H,O.key),children:[o.jsxRuntimeExports.jsx(Rn,{children:z.renewalDate!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:vo(z.renewalDate)}),o.jsxRuntimeExports.jsx(t.SmallRegular,{children:z.renewalDate.format(F.visual.MMMDCommaYYYYformat)})]}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:g})}),Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"group":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-group",D),onContextMenu:H=>ge(H,O.key),children:[z.companyGroup!=null?o.jsxRuntimeExports.jsx(Wm,{"data-testid":t.generateDataTestId("health-monitor-row-group-badge",D),textColor:ki[z.companyGroup.id],children:z.companyGroup.name.toUpperCase()}):g,Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-mrr",D),onContextMenu:H=>ge(H,O.key),children:[t.amountToString("0,0",z.monthlyRecurringRevenue),Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"externalProductServiceExposure":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-external-exposure",D),onContextMenu:H=>ge(H,O.key),children:[z.externalProductServiceExposure!=null?z.externalProductServiceExposure.name:g,Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"lastEngagement":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-last-engagement",D),onContextMenu:H=>ge(H,O.key),children:[Ie.length>0?o.jsxRuntimeExports.jsxs(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`},title:o.jsxRuntimeExports.jsxs(Hm,{children:[o.jsxRuntimeExports.jsxs(Km,{children:[I,b]}),Ie.map((H,ue)=>o.jsxRuntimeExports.jsxs(Gm,{children:[o.jsxRuntimeExports.jsxs(Ym,{children:[H.type==="email"?o.jsxRuntimeExports.jsx(qm,{}):o.jsxRuntimeExports.jsx(Qm,{}),o.jsxRuntimeExports.jsx(Im,{children:H.type==="email"?A.email:A.meeting})]}),o.jsxRuntimeExports.jsx(Zm,{children:H.scheduledAt?.utc(!0).local().format(F.visual.MMMDCommaYYYYformat)??g})]},`${o.nanoid()}_${ue}}`))]}),children:[Ie[0].scheduledAt?.utc(!0).local().format(F.visual.MMMDCommaYYYYformat)??g,o.jsxRuntimeExports.jsxs(Xm,{children:[Ie[0].type==="email"?o.jsxRuntimeExports.jsx(Hi,{className:"engagement-email-icon"}):o.jsxRuntimeExports.jsx(Ki,{className:"engagement-meeting-icon"}),o.jsxRuntimeExports.jsxs(Jm,{children:["Via",C,Ie[0].type==="email"?A.email:A.meeting]})]})]}):o.jsxRuntimeExports.jsx(t.StandardRegular,{children:g}),Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"dashboardLastSeen":case"subscriptionDate":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId(`health-monitor-row-${O.key==="dashboardLastSeen"?"dashboard-last-seen":"subscription-date"}`,D),onContextMenu:H=>ge(H,O.key),children:[z.subscriptionStartDate??g,Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);case"companyEngagementMetricsUpdatedAt":return o.jsxRuntimeExports.jsxs(qe,{ref:H=>{l(D,O.key,H)},columnWidth:O.width,windowSize:m,isThreadAllowed:O.isThreadAllowed,className:oe,"data-testid":t.generateDataTestId("health-monitor-row-engagement-updated",D),onContextMenu:H=>ge(H,O.key),children:[o.jsxRuntimeExports.jsx(Rn,{children:z.companyEngagementMetricsUpdatedAt!=null?o.jsxRuntimeExports.jsx(t.LargeRegular,{children:vo(z.companyEngagementMetricsUpdatedAt)}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:g})}),Ce({isElementThreadOpen:Se,isElementThreadPresent:ce,itemKey:O.key,elementThreadId:U,threadStyle:de?{right:t.Space.sp0}:void 0})]},U);default:return null}})})})}const Ui=({productVerticals:e,testIdSuffix:n})=>{const r=i=>{switch(i){case"billpay":return{key:"ZBP",color:t.Colors.graphColor34Dark};case"reimbursement":return{key:"ZR",color:t.Colors.graphColor06Dark};case"accounts":return{key:"ZA",color:t.Colors.graphColor09Dark};case"cards":return{key:"ZC",color:t.Colors.graphColor33Dark};case"payroll_manager_service_plan":return{key:"Payroll",color:t.Colors.graphColor26Dark};case"zeni_tax_plan":return{key:"Tax",color:t.Colors.graphColor35Dark};case"cfo_plan":return{key:"CFO",color:t.Colors.graphColor17Dark};default:return}};return o.jsxRuntimeExports.jsx(Pm,{"data-testid":t.generateDataTestId("health-monitor-product-services",n),children:e.map((i,a)=>{const d=r(i.productServiceKey);if(d!=null){const l=n!=null&&n!==""?`${d.key}-${n}`:d.key;return o.jsxRuntimeExports.jsx(Lm,{color:d.color,isEnabled:i.isEnabled,"data-testid":t.generateDataTestId("health-monitor-product-chip",l),children:d.key},`${o.nanoid()}_${a}`)}else return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{})})})},Tm=s.div`
|
|
1321
|
+
`,{dateFormat:qs,timeFormat:vm,timeframe:rt,common:wm}=t.appLocale.getLocalizedStrings(),bn=e=>{if(e!=null){const n=ee.dateNow();return Math.abs(n.diff(e,"days"))}};function vo(e){if(e==null)return;const n=ee.dateNow();if(Math.abs(n.diff(e,"days"))<=0)return`0 ${rt.day}`;const[i,a]=e<n?[e,n]:[n,e],d=i.year(),l=i.month(),c=i.date(),p=a.year(),m=a.month(),x=a.date();let g=p-d,h=m-l,C=x-c;if(C<0){h--;const S=new Date(p,m,0);C+=S.getDate()}h<0&&(g--,h+=12);const b=[];return g>0&&b.push(`${g} ${g>1?rt.year:rt.year.slice(0,-1)}`),h>0&&b.push(`${h} ${h>1?rt.month:rt.month.slice(0,-1)}`),C>0&&b.push(`${C} ${C>1?rt.day:rt.day.slice(0,-1)}`),b.join(", ")}function Wi(e){if(e==null)return wm.strings.hyphen;const n=Math.floor(Number(e)/12),r=Number(e)%12,i=n>1?rt.year:rt.year.slice(0,-1),a=r>1?rt.month:rt.month.slice(0,-1);return n===0?`${e} ${a}`:r===0?`${n} ${i}`:`${n} ${i}, ${r} ${a}`}const _i=e=>({name:e?.companyInfo.name??"",productVerticals:e?.companyHealthMetric.verticalProductServices??void 0,runway:e?.companyHealthMetric.runway,churnProbabilityPercentage:e?.companyHealthMetric.churnProbabilityPercentage,netPromoterScore:e?.companyHealthMetric.netPromoterScore,customerSatisfactionScore:e?.companyHealthMetric.customerSatisfactionScore,lastReportSent:e?.managementInfo.lastReportSentDate!=null?vo(ee.zeniDate(e?.managementInfo.lastReportSentDate.toISOString())):void 0,dashboardLastVisit:e?.companyHealthMetric.customerLastDashboardVisit!=null?ee.zeniDate(e?.companyHealthMetric.customerLastDashboardVisit.toISOString()).format(qs.visual.MMMDCommaYYYYformat):void 0,companyEngagementMetricsUpdatedAt:e?.companyHealthMetric.companyEngagementMetricsUpdatedAt!=null?{date:ee.zeniDate(e?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(qs.visual.MMMDCommaYYYYformat),time:ee.zeniDate(e?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(vm.hhmmAFormat)}:void 0,noOfVerticalsEnabled:e?.noOfProductVerticalsEnabled,renewalDate:e?.companyHealthMetric.subscriptionRenewalDate!=null?vo(ee.zeniDate(e?.companyHealthMetric.subscriptionRenewalDate.toISOString())):void 0,lastEngagements:e!=null?e.companyHealthMetric.lastEngagements:[],additionalChurnFactors:e!=null?e.companyHealthMetric.additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]},updatedByUserName:e?.companyHealthMetric.updatedByUser!=null?t.getFullName(e.companyHealthMetric.updatedByUser):void 0}),_e=t.appLocale.getLocalizedStrings().cockpit.health.header,Nt=[{key:"companyName",value:_e.name,sortOrder:"ascending",width:new t.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"churnProbability",value:_e.churnProbability,sortOrder:"ascending",width:new t.ResponsiveSized(380,380),isThreadAllowed:!0},{key:"controller",value:_e.controller,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"customerSuccessManager",value:_e.customerSuccessManager,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"lastEngagement",value:_e.lastEngagement,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"companyEngagementMetricsUpdatedAt",value:_e.companyEngagementMetricsUpdatedAt,sortOrder:"ascending",width:new t.ResponsiveSized(160,160),isThreadAllowed:!0},{key:"runway",value:_e.runway,sortOrder:"ascending",width:new t.ResponsiveSized(220,220),isThreadAllowed:!0},{key:"netPromoterScore",value:_e.netPromoterScore,sortOrder:"ascending",width:new t.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"customerSatisfactionScore",value:_e.customerSatisfactionScore,sortOrder:"ascending",width:new t.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"lastReportSent",value:_e.lastReportSent,sortOrder:"ascending",width:new t.ResponsiveSized(250,250),isThreadAllowed:!0},{key:"dashboardLastSeen",value:_e.dashboardLastSeen,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"subscriptionDate",value:_e.subscriptionDate,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"renewalDate",value:_e.renewalDate,sortOrder:"ascending",width:new t.ResponsiveSized(180,180),isThreadAllowed:!0},{key:"group",value:_e.group,sortOrder:"ascending",width:new t.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:_e.monthlyRecurringRevenue,sortOrder:"ascending",width:new t.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"externalProductServiceExposure",value:_e.externalProductServiceExposure,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"productVerticals",value:_e.productVerticals,sortOrder:"ascending",width:new t.ResponsiveSized(360,360),isThreadAllowed:!0}];Nt.map(e=>e.key);const Vi=e=>ae.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ae.createElement("path",{d:"M10.1094 4H2.3764C2.16286 4 1.98975 4.22386 1.98975 4.5V11.5C1.98975 11.7761 2.16286 12 2.3764 12H10.1094C10.323 12 10.4961 11.7761 10.4961 11.5V4.5C10.4961 4.22386 10.323 4 10.1094 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M11.0046 7L14.0046 5V11L11.0046 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}));function km({companyView:e,healthView:n,companyNameSticky:r,totalHeight:i,addThreadRequestThreadId:a,setNoteData:d,setElementRef:l,setAddThreadRequestThreadId:c,onRowClick:p}){const m=t.useWindowSizeContext(),x=t.appLocale.getLocalizedStrings(),{common:{strings:{hyphen:g,backspace:h,space:C,colon:b,dot:S}},cockpit:{health:{detailPage:{churnProbabilityTexts:{churnProbability:y,for:j,is:f,percent:E},notApplicable:$},common:{engagementTypes:A,labels:{lastEngagements:I,factorsThatDecreaseChurnProbability:w,factorsThatIncreaseChurnProbability:k}}}},dateFormat:N}=x,{companyInfo:{companyId:D,name:G},companyHealthMetric:O,controllers:Z,managementInfo:{lastReportSentDate:q,customerSuccessManagerUserIds:R}}=e,T=_i(e),W=n.zeniUsers.values.filter(M=>R.includes(M.userId)),v=`cockpit_${D}`,L="healthMonitor.notes",{threads:J,isLoading:re}=t.useFilteredThreads({entityType:L,companyId:D},!1),F={name:G,companyId:D,companyGroup:e.companyGroup!=null?e.companyGroup.find(M=>M.id===e.managementInfo.companyGroupId):void 0,monthlyRecurringRevenue:e.monthlyRecurringRevenue,productVerticals:O.verticalProductServices,runway:O.runway,churnProbabilityPercentage:O.churnProbabilityPercentage,netPromoterScore:O.netPromoterScore,customerSatisfactionScore:O.customerSatisfactionScore,controllers:Z.map(M=>ee.getUserName(M)),customerSuccessManagers:W.map(M=>ee.getUserName(M)),lastReportSent:q!=null?ee.zeniDate(q.toISOString()):void 0,subscriptionStartDate:O.subscriptionStartDate!=null?ee.zeniDate(O.subscriptionStartDate.toISOString()).format(N.visual.MMMDCommaYYYYformat):void 0,renewalDate:O.subscriptionRenewalDate!=null?ee.zeniDate(O.subscriptionRenewalDate.toISOString()):void 0,companyEngagementMetricsUpdatedAt:O.companyEngagementMetricsUpdatedAt,externalProductServiceExposure:O.externalProductServiceExposure},{openThread:K,threads:H,addThread:_,removeThread:oe,setOpenThread:ne,setRequestToOpenThread:Y}=u.useContext(t.ThreadsContext),le=u.useRef(null),ce=K!==null?H.get(K):null,fe=K?.includes(D)===!0,we=K!=null&&H.get(K)==null&&fe,B=a!=null&&H.get(a)?.metadata.companyId===D,Se=u.useCallback(()=>{K?.includes(t.NEW_THREAD_SUFFIX)===!0&&oe(K),a!=null&&c(void 0)},[a,K,oe,c]),ie=u.useCallback(M=>{if(M===K)ne(null);else if(H.has(M))ne(M);else if(M.includes(t.NEW_THREAD_SUFFIX)){const[z,Ce]=M.replace(t.NEW_THREAD_SUFFIX,"").split("."),ue=_t(Rt(z),ee.toHealthSortKeyType(Ce),D,G);_(M,{type:"thread",visibility:"public",id:M,roomId:v,createdAt:new Date,updatedAt:new Date,comments:[],metadata:ue,resolved:!1}),ne(M)}},[D,G,K,H,_,ne,v]),ye=u.useCallback((M,z,Ce=!1)=>{const ue=Nt.find(Q=>Q.key===z);if(Y(null),ue!=null&&(M.type==="contextmenu"||Ce===!0)){if(ue.isThreadAllowed===!1)return;Se(),M.preventDefault(),M.stopPropagation();const Q=t.toCollaborationEntityType({tab:"healthMonitor",key:ue.key}),P=[...t.getFilteredThreads(H,{entityType:Q,companyId:D},"both")],me=P.length>0&&P[0].length>0?P[0][0]:Pe("healthMonitor",ue.key,D);H.has(me)?ie(me):a===me?c(void 0):(c(me),ne(null))}},[H,D,a,ie,c,ne,Y,Se]),Ie=u.useCallback((M,z)=>{M.stopPropagation();const Ce=Pe("healthMonitor",z,D);c(void 0),ie(Ce)},[D,c,ie]),xe=M=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:M.isElementThreadOpen??!1,isElementThreadPresent:M.isElementThreadPresent??!1,itemKey:M.itemKey,elementThreadId:M.elementThreadId??"",roomId:v,addThreadRequestThreadId:a,openThreadId:K,threadStyle:M.threadStyle,openThreadMetadata:ce?.metadata??null,onElementClick:ye,onAddThreadClick:Ie});return o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{Y(null),a!=null&&(c(void 0),a.includes(t.NEW_THREAD_SUFFIX)&&oe(a))},children:o.jsxRuntimeExports.jsx(Tm,{windowSize:m,isThreadOpen:fe||B,totalHeight:i,isCreationInProgress:we,"data-testid":t.generateDataTestId("health-monitor-row",D),onClick:()=>p(F.companyId),children:Nt.map((M,z)=>{const Ce=t.toCollaborationEntityType({tab:"healthMonitor",key:M.key}),ue=Nt.length-2<=z,Q=[...t.getFilteredThreads(H,{entityType:Ce,companyId:D},"both")],P=Q.length>0&&Q[0].length>0?Q[0][0]:Pe("healthMonitor",M.key,D),me=H.get(P),be=me!=null&&me.resolved===!1,pe=P===K,De=a===P,je=T.lastEngagements;switch(M.key){case"companyName":return o.jsxRuntimeExports.jsxs(Am,{companyNameSticky:r,columnWidth:M.width,windowSize:m,isThreadOpen:pe||De,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-company-name",D),onContextMenu:U=>ye(U,M.key),ref:U=>{l(D,M.key,U)},children:[o.jsxRuntimeExports.jsxs(Nm,{ref:le,"data-testid":t.generateDataTestId("health-monitor-row-company-name-text",D),children:[F.name,o.jsxRuntimeExports.jsx(t.ThreadComponent,{anchorRef:le,isElementThreadOpen:pe,roomId:v,openThreadId:K,openThreadMetadata:ce?.metadata??null})]}),o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`2px ${t.Space.sp2}`},title:"Notes",children:o.jsxRuntimeExports.jsxs(zm,{className:"notesIcon","data-testid":t.generateDataTestId("health-monitor-row-notes-icon",D),onClick:U=>{U.preventDefault(),U.stopPropagation(),d({roomId:v,companyId:D,companyName:G,entityType:L})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:J.length,isLoading:re}),o.jsxRuntimeExports.jsx(Fm,{})]})}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:be,itemKey:M.key,style:{left:t.Space.sp4},onElementClick:ye}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Pe("healthMonitor",M.key,D),addThreadRequestThreadId:a,itemKey:M.key,onAddThreadClick:Ie})]},P);case"productVerticals":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-product-verticals",D),onContextMenu:U=>ye(U,M.key),children:[o.jsxRuntimeExports.jsx(Ui,{productVerticals:O.verticalProductServices,testIdSuffix:D}),xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"runway":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-runway",D),onContextMenu:U=>ye(U,M.key),children:[F.runway!=null?ee.isCompanyRunwayInfinite(F.runway)===!0?o.jsxRuntimeExports.jsx(Bm,{"data-testid":t.generateDataTestId("health-monitor-row-runway-infinity",D)}):Wi(F.runway.runwayMonths):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:g}),xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"churnProbability":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-churn-probability",D),onContextMenu:U=>ye(U,M.key),children:[o.jsxRuntimeExports.jsx(Mm,{"data-testid":t.generateDataTestId("health-monitor-row-churn-meter",D),children:o.jsxRuntimeExports.jsx(Bi,{percentage:F.churnProbabilityPercentage,barHeight:12})}),T.churnProbabilityPercentage!=null?o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`,textAlign:"left"},title:o.jsxRuntimeExports.jsxs(Vm,{children:[o.jsxRuntimeExports.jsx(Um,{children:`${y} ${j} ${e.companyInfo.name} ${f} ${Math.round(T.churnProbabilityPercentage??0)}${E}${S}`}),e.companyHealthMetric.churnProbabilityReason.length!==0||e.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(Js,{children:[o.jsxRuntimeExports.jsxs(er,{children:[k,b]}),o.jsxRuntimeExports.jsxs(tr,{children:[e.companyHealthMetric.churnProbabilityReason.map((U,Ee)=>o.jsxRuntimeExports.jsx($n,{children:o.jsxRuntimeExports.jsx(En,{children:U.text})},`${o.nanoid()}_${Ee}}`)),e.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((U,Ee)=>o.jsxRuntimeExports.jsx($n,{children:o.jsxRuntimeExports.jsx(En,{children:U.value})},`${o.nanoid()}_${Ee}}`))]})]}):null,e.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(Js,{children:[o.jsxRuntimeExports.jsxs(er,{children:[w,b]}),o.jsxRuntimeExports.jsx(tr,{children:e.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((U,Ee)=>o.jsxRuntimeExports.jsx($n,{children:o.jsxRuntimeExports.jsx(En,{children:U.value})},`${o.nanoid()}_${Ee}}`))})]}):null]}),children:o.jsxRuntimeExports.jsx(_m,{"data-testid":t.generateDataTestId("health-monitor-row-churn-info-icon",D),style:{marginTop:t.Space.sp1,marginLeft:t.Space.sp1,marginRight:t.Space.sp0}})}):null,xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"customerSatisfactionScore":case"netPromoterScore":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId(`health-monitor-row-${M.key==="netPromoterScore"?"nps":"csat"}`,D),onContextMenu:U=>ye(U,M.key),children:[F[M.key]!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Om,{children:F[M.key]}),o.jsxRuntimeExports.jsx(Dm,{children:h}),M.key==="netPromoterScore"?o.jsxRuntimeExports.jsxs(Qs,{children:[" ",Ja," "]}):o.jsxRuntimeExports.jsxs(Qs,{children:[" ",el," "]})]}):F.churnProbabilityPercentage!=null?$:g,xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"controller":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-controller",D),onContextMenu:U=>ye(U,M.key),children:[o.jsxRuntimeExports.jsx(t.Tooltip,{enterDelay:600,style:{padding:`2px ${t.Space.sp2}`},title:F.controllers.join(", "),children:F.controllers[0]}),xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"customerSuccessManager":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-csm",D),onContextMenu:U=>ye(U,M.key),children:[o.jsxRuntimeExports.jsx(t.Tooltip,{enterDelay:600,style:{padding:`2px ${t.Space.sp2}`,textAlign:"left"},maxWidth:"300px",title:F.customerSuccessManagers.join(", "),children:F.customerSuccessManagers[0]}),xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"lastReportSent":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-last-report-sent",D),onContextMenu:U=>ye(U,M.key),children:[o.jsxRuntimeExports.jsx(Rn,{children:F.lastReportSent!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:vo(F.lastReportSent)}),o.jsxRuntimeExports.jsx(t.SmallRegular,{children:F.lastReportSent.format(N.visual.MMMDCommaYYYYformat)})]}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:g})}),xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"renewalDate":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-renewal-date",D),onContextMenu:U=>ye(U,M.key),children:[o.jsxRuntimeExports.jsx(Rn,{children:F.renewalDate!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:vo(F.renewalDate)}),o.jsxRuntimeExports.jsx(t.SmallRegular,{children:F.renewalDate.format(N.visual.MMMDCommaYYYYformat)})]}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:g})}),xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"group":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-group",D),onContextMenu:U=>ye(U,M.key),children:[F.companyGroup!=null?o.jsxRuntimeExports.jsx(Wm,{"data-testid":t.generateDataTestId("health-monitor-row-group-badge",D),textColor:ki[F.companyGroup.id],children:F.companyGroup.name.toUpperCase()}):g,xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-mrr",D),onContextMenu:U=>ye(U,M.key),children:[t.amountToString("0,0",F.monthlyRecurringRevenue),xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"externalProductServiceExposure":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-external-exposure",D),onContextMenu:U=>ye(U,M.key),children:[F.externalProductServiceExposure!=null?F.externalProductServiceExposure.name:g,xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"lastEngagement":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-last-engagement",D),onContextMenu:U=>ye(U,M.key),children:[je.length>0?o.jsxRuntimeExports.jsxs(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`},title:o.jsxRuntimeExports.jsxs(Hm,{children:[o.jsxRuntimeExports.jsxs(Km,{children:[I,b]}),je.map((U,Ee)=>o.jsxRuntimeExports.jsxs(Gm,{children:[o.jsxRuntimeExports.jsxs(Ym,{children:[U.type==="email"?o.jsxRuntimeExports.jsx(qm,{}):o.jsxRuntimeExports.jsx(Qm,{}),o.jsxRuntimeExports.jsx(Im,{children:U.type==="email"?A.email:A.meeting})]}),o.jsxRuntimeExports.jsx(Zm,{children:U.scheduledAt?.utc(!0).local().format(N.visual.MMMDCommaYYYYformat)??g})]},`${o.nanoid()}_${Ee}}`))]}),children:[je[0].scheduledAt?.utc(!0).local().format(N.visual.MMMDCommaYYYYformat)??g,o.jsxRuntimeExports.jsxs(Xm,{children:[je[0].type==="email"?o.jsxRuntimeExports.jsx(Hi,{className:"engagement-email-icon"}):o.jsxRuntimeExports.jsx(Ki,{className:"engagement-meeting-icon"}),o.jsxRuntimeExports.jsxs(Jm,{children:["Via",C,je[0].type==="email"?A.email:A.meeting]})]})]}):o.jsxRuntimeExports.jsx(t.StandardRegular,{children:g}),xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"dashboardLastSeen":case"subscriptionDate":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId(`health-monitor-row-${M.key==="dashboardLastSeen"?"dashboard-last-seen":"subscription-date"}`,D),onContextMenu:U=>ye(U,M.key),children:[F.subscriptionStartDate??g,xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);case"companyEngagementMetricsUpdatedAt":return o.jsxRuntimeExports.jsxs(qe,{ref:U=>{l(D,M.key,U)},columnWidth:M.width,windowSize:m,isThreadAllowed:M.isThreadAllowed,className:te,"data-testid":t.generateDataTestId("health-monitor-row-engagement-updated",D),onContextMenu:U=>ye(U,M.key),children:[o.jsxRuntimeExports.jsx(Rn,{children:F.companyEngagementMetricsUpdatedAt!=null?o.jsxRuntimeExports.jsx(t.LargeRegular,{children:vo(F.companyEngagementMetricsUpdatedAt)}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:g})}),xe({isElementThreadOpen:pe,isElementThreadPresent:be,itemKey:M.key,elementThreadId:P,threadStyle:ue?{right:t.Space.sp0}:void 0})]},P);default:return null}})})})}const Ui=({productVerticals:e,testIdSuffix:n})=>{const r=i=>{switch(i){case"billpay":return{key:"ZBP",color:t.Colors.graphColor34Dark};case"reimbursement":return{key:"ZR",color:t.Colors.graphColor06Dark};case"accounts":return{key:"ZA",color:t.Colors.graphColor09Dark};case"cards":return{key:"ZC",color:t.Colors.graphColor33Dark};case"payroll_manager_service_plan":return{key:"Payroll",color:t.Colors.graphColor26Dark};case"zeni_tax_plan":return{key:"Tax",color:t.Colors.graphColor35Dark};case"cfo_plan":return{key:"CFO",color:t.Colors.graphColor17Dark};default:return}};return o.jsxRuntimeExports.jsx(Pm,{"data-testid":t.generateDataTestId("health-monitor-product-services",n),children:e.map((i,a)=>{const d=r(i.productServiceKey);if(d!=null){const l=n!=null&&n!==""?`${d.key}-${n}`:d.key;return o.jsxRuntimeExports.jsx(Lm,{color:d.color,isEnabled:i.isEnabled,"data-testid":t.generateDataTestId("health-monitor-product-chip",l),children:d.key},`${o.nanoid()}_${a}`)}else return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{})})})},Tm=s.div`
|
|
1322
1322
|
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
1323
1323
|
border-radius: ${t.Space.sp2};
|
|
1324
1324
|
display: flex;
|
|
@@ -1343,7 +1343,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
1345
1345
|
|
|
1346
|
-
${e=>e.isThreadOpen?
|
|
1346
|
+
${e=>e.isThreadOpen?ve.css`
|
|
1347
1347
|
box-shadow: ${t.Space.sp0} 2px ${t.Space.sp2}
|
|
1348
1348
|
${e.theme.colors.dropShadowHover};
|
|
1349
1349
|
border: 1px solid ${e.theme.colors.primary};
|
|
@@ -1363,7 +1363,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1363
1363
|
border-color: ${e=>e.theme.colors.primary};
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
|
-
${e=>e.isCreationInProgress?
|
|
1366
|
+
${e=>e.isCreationInProgress?ve.css`
|
|
1367
1367
|
border: 1px solid ${e.theme.colors.primary};
|
|
1368
1368
|
animation: animate 3s linear infinite;
|
|
1369
1369
|
`:null};
|
|
@@ -1400,7 +1400,9 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1400
1400
|
`,Qs=s.div`
|
|
1401
1401
|
${t.textStyles.smallRegular.css};
|
|
1402
1402
|
padding-top: ${t.Space.sp1};
|
|
1403
|
-
`,Nm=s.div
|
|
1403
|
+
`,Nm=s.div`
|
|
1404
|
+
position: relative;
|
|
1405
|
+
`,Mm=s.div`
|
|
1404
1406
|
width: 85%;
|
|
1405
1407
|
`,Rn=s.div`
|
|
1406
1408
|
justify-content: center;
|
|
@@ -1497,7 +1499,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1497
1499
|
color: ${t.Colors.heroDark};
|
|
1498
1500
|
`,Qm=s(Ki)`
|
|
1499
1501
|
color: ${t.Colors.heroDark};
|
|
1500
|
-
`,Jm=s(t.SmallRegular)``,ao=t.appLocale.getLocalizedStrings().common,Bo=(e,n)=>`${e}.${n}`,or=e=>`${e}_form`,ht="healthMonitorDetails",nr="healthMonitorPage",sr="netPromoterScore",rr="customerSatisfactionScore",ir="externalProductServiceExposure",ar="additionalChurnFactors",Gi=e=>[{label:px,options:e.increasingChurnProbability.map(n=>({label:n.value,value:n.code}))},{label:dx,options:e.decreasingChurnProbability.map(n=>({label:n.value,value:n.code}))}],Yi=e=>e==null?[]:e.increasingChurnProbability.map(n=>n.code).concat(e.decreasingChurnProbability.map(n=>n.code)),{common:{to:ex,from:tx,cc:ox,host:nx,attendees:sx,texts:{subject:lr,addMore:rx,select:ix},strings:{colon:Ye,hyphen:cr,comma:ax,space:lx}},cockpit:{health:{detailPage:we,common:{engagementTypes:dr,labels:{lastEngagements:cx,factorsThatDecreaseChurnProbability:dx,factorsThatIncreaseChurnProbability:px,contributingFactors:ux,increaseChurnProbability:mx,decreasingChurnProbability:xx}}}},dateFormat:hx}=t.appLocale.getLocalizedStrings();function gx({localData:e,companyHealthMetricViewSelector:n,additionalChurnFactorsOptions:r,analytics:i,urlSource:a,onCloseDrawer:d,onSaveChangesToLocalStore:l,onSaveClick:c}){const{selectedCompanyDetail:p,localFormDataAndStatusByCompanyId:m}=n,[x,g]=u.useState(!1),h=_i(p),[C,b]=u.useState(!1),[S,y]=u.useState(!1),j=o.useForm({mode:"all",defaultValues:Sx(e,r),reValidateMode:"onBlur"}),f=u.useRef(null);function E(R){p!=null&&i.trackCockpitHealthMonitorChurnFormClicked(R,{companyId:p.companyInfo.companyId,companyName:p.companyInfo.name,zeniProductAndServicesCount:p.noOfProductVerticalsEnabled,daysToRenewal:bn(p.companyHealthMetric.subscriptionRenewalDate)??null,netPromoterScore:m?.companyHealthMetricLocalData.netPromoterScore??null,customerSatisfactionScore:m?.companyHealthMetricLocalData.customerSatisfactionScore??null,externalServicesExposure:m?.companyHealthMetricLocalData.externalProductServiceExposure??null,runwayMonths:J.isCompanyRunwayInfinite(p.companyHealthMetric.runway)===!0?1e6:p.companyHealthMetric.runway===void 0?null:p.companyHealthMetric.runway.runwayMonths??null,dashBoardLastSeen:bn(p.companyHealthMetric.customerLastDashboardVisit)??null,lastReportSent:bn(p.managementInfo.lastReportSentDate)??null,churnProbability:p.companyHealthMetric.churnProbabilityPercentage??null})}const $=j.handleSubmit(()=>{E("Save"),f?.current&&f.current.scrollTo({top:0,behavior:"instant"}),b(!0),g(!0),c()}),A=async(R,L)=>{if(R!=null){const W={...L},k=W[ht][ar].selectedOptions,P={netPromoterScore:W[ht][sr]?.selectedOption,customerSatisfactionScore:W[ht][rr]?.selectedOption,externalProductServiceExposure:W[ht][ir]?.selectedOption,additionalChurnFactors:{increasingChurnProbability:r.increasingChurnProbability.filter(N=>k.indexOf(N.code)!=-1),decreasingChurnProbability:r.decreasingChurnProbability.filter(N=>k.indexOf(N.code)!=-1)}};l(P)}},I=u.useRef(null),v=u.useRef(null),[w,F]=u.useState(null),D=u.useRef(null),K=Yi(e.additionalChurnFactors);u.useEffect(()=>(v.current=setTimeout(()=>{I.current&&(F(I.current),v.current&&clearTimeout(v.current))},10),()=>{v.current!=null&&clearTimeout(v.current)}),[K]),u.useEffect(()=>{const R=j.watch((L,{name:W})=>{W!=null&&L!=null&&o.defer(()=>A(W,L))});return()=>{R.unsubscribe()}}),u.useEffect(()=>{if(p!=null){const L=p.controllers.map(W=>`${W.firstName} ${W.lastName}`);a||i.trackCockpitHealthMonitorRowClicked(p.companyInfo.companyId,p.companyInfo.name,L,p.companyHealthMetric.netPromoterScore,p.companyHealthMetric.customerSatisfactionScore,p.companyHealthMetric.churnProbabilityPercentage)}},[]);function M(R){return R!=null?`${we.churnProbabilityTexts.churnProbability} ${we.churnProbabilityTexts.is} ${h.churnProbabilityPercentage}${we.churnProbabilityTexts.percent}`:`${we.churnProbabilityTexts.churnProbability} ${we.churnProbabilityTexts.percent}`}function G(){E("Cancel"),d()}const q={valueContainer:R=>({...R,padding:`2px ${t.Space.sp3}`,overflow:"unset"}),multiValue:R=>({...R,margin:0})};return o.jsxRuntimeExports.jsxs(Hx,{ref:f,"data-testid":t.generateDataTestId("health-monitor-drawer"),children:[o.jsxRuntimeExports.jsxs(Bx,{"data-testid":t.generateDataTestId("health-monitor-drawer-header"),children:[o.jsxRuntimeExports.jsx(Wx,{"data-testid":t.generateDataTestId("health-monitor-drawer-title"),children:`${p?.companyInfo.name}${we.heading}`}),o.jsxRuntimeExports.jsx(vx,{"data-testid":t.generateDataTestId("health-monitor-drawer-close-button"),onClick:G,children:o.jsxRuntimeExports.jsx(wx,{})})]}),o.jsxRuntimeExports.jsxs(Ux,{children:[n.localFormDataAndStatusByCompanyId?.saveStatus?.fetchState==="Error"?o.jsxRuntimeExports.jsx(th,{"data-testid":t.generateDataTestId("health-monitor-drawer-error"),children:o.jsxRuntimeExports.jsxs(oh,{children:[o.jsxRuntimeExports.jsx(sh,{}),n.localFormDataAndStatusByCompanyId.saveStatus.error?.message!=null?o.jsxRuntimeExports.jsx(nh,{"data-testid":t.generateDataTestId("health-monitor-drawer-error-text"),children:n.localFormDataAndStatusByCompanyId.saveStatus.error?.message}):null]})}):null,o.jsxRuntimeExports.jsx(Tx,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-section"),children:m?.saveStatus?.fetchState==="In-Progress"?o.jsxRuntimeExports.jsxs(kx,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-loader"),children:[o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0}),o.jsxRuntimeExports.jsx(t.ExtraLargeRegular,{children:we.calculatingProbability})]}):o.jsxRuntimeExports.jsxs(_x,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-box"),children:[o.jsxRuntimeExports.jsx(Vx,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-heading"),children:M(h.churnProbabilityPercentage)}),o.jsxRuntimeExports.jsx(fx,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-meter"),children:o.jsxRuntimeExports.jsx(Bi,{barHeight:32,percentage:h.churnProbabilityPercentage})}),o.jsxRuntimeExports.jsx(Px,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-reasons"),children:p?.companyHealthMetric.churnProbabilityPercentage!=null&&p?.companyHealthMetric.churnProbabilityReason.length!==0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Ix,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-contributing-heading"),children:ux}),p.companyHealthMetric.churnProbabilityReason.length!==0||p.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(ur,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-increasing-factors"),children:[o.jsxRuntimeExports.jsx(pr,{children:`${mx}${Ye}`}),o.jsxRuntimeExports.jsxs(xr,{children:[p.companyHealthMetric.churnProbabilityReason.map((R,L)=>o.jsxRuntimeExports.jsx(vn,{children:o.jsxRuntimeExports.jsx(wn,{children:R.text})},`${o.nanoid()}_${L}}`)),p.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((R,L)=>o.jsxRuntimeExports.jsxs(vn,{children:[o.jsxRuntimeExports.jsx(wn,{children:R.value}),o.jsxRuntimeExports.jsx(mr,{children:"Newly added"})]},`${o.nanoid()}_${L}}`))]})]}):null,p?.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(ur,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-decreasing-factors"),children:[o.jsxRuntimeExports.jsx(pr,{children:`${xx}${Ye}`}),o.jsxRuntimeExports.jsx(xr,{children:p.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((R,L)=>o.jsxRuntimeExports.jsxs(vn,{children:[o.jsxRuntimeExports.jsx(wn,{children:R.value}),o.jsxRuntimeExports.jsx(mr,{children:"Newly added"})]},`${o.nanoid()}_${L}}`))})]}):null,o.jsxRuntimeExports.jsxs(Dx,{"data-testid":t.generateDataTestId("health-monitor-drawer-add-more-button"),onClick:()=>{t.scrollContainerToTargetAdjusted(D?.current,f?.current),setTimeout(()=>{y(!0)},500)},ref:D,children:[o.jsxRuntimeExports.jsx(Ax,{}),o.jsxRuntimeExports.jsx(Lx,{children:rx})]})]}):null})]})}),o.jsxRuntimeExports.jsxs(Gx,{"data-testid":t.generateDataTestId("health-monitor-drawer-form-container"),children:[o.jsxRuntimeExports.jsxs(Ox,{children:[o.jsxRuntimeExports.jsxs(Mx,{children:[o.jsxRuntimeExports.jsx(zx,{"data-testid":t.generateDataTestId("health-monitor-drawer-manual-input-heading"),children:we.manualInput.header}),o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"250px",variant:"small-description",data:we.tooltipTexts.manualInputText,placement:"top",children:o.jsxRuntimeExports.jsx(Wo,{"data-testid":t.generateDataTestId("health-monitor-drawer-manual-input-info"),style:{marginTop:t.Space.sp1,marginRight:t.Space.sp0}})})]}),h.companyEngagementMetricsUpdatedAt!=null&&n.localFormDataAndStatusByCompanyId?.saveStatus?.fetchState!=="In-Progress"?o.jsxRuntimeExports.jsx(Nx,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-updated"),children:h.updatedByUserName!=null?o.jsxRuntimeExports.jsxs(hr,{children:[`${we.lastUpdatedBy}${Ye} ${h.updatedByUserName}`,o.jsxRuntimeExports.jsx(ms,{}),`${h.companyEngagementMetricsUpdatedAt.date}${ax}${lx}${h.companyEngagementMetricsUpdatedAt.time}`]}):o.jsxRuntimeExports.jsxs(hr,{children:[`${we.lastUpdatedAt}${Ye} ${h.companyEngagementMetricsUpdatedAt.date}`,o.jsxRuntimeExports.jsx(ms,{}),`${h.companyEngagementMetricsUpdatedAt.time}`]})}):null]}),o.jsxRuntimeExports.jsx(o.FormProvider,{...j,children:o.jsxRuntimeExports.jsx("form",{id:or(nr),onSubmit:$,children:o.jsxRuntimeExports.jsxs(Yx,{"data-testid":t.generateDataTestId("health-monitor-drawer-form-fields"),children:[o.jsxRuntimeExports.jsx(Cx,{"data-testid":t.generateDataTestId("health-monitor-drawer-nps-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectNumericField,{label:{label:`${we.manualInput.labels.netPromoterScore}${Ye}`,width:0,style:{width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(R,L)=>({input:{textAlign:L.selectProps.menuIsOpen===!1&&e.netPromoterScore==null?"right":"left"}})},placeholder:ao.add,name:Bo(ht,sr),defaultValue:{allOptions:Ri,selectedOption:e.netPromoterScore},registerOptions:{required:!0,validate:(R,L)=>L.healthMonitorDetails.customerSatisfactionScore.selectedOption?!0:R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(kn,{}),o.jsxRuntimeExports.jsx(jx,{"data-testid":t.generateDataTestId("health-monitor-drawer-csat-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectNumericField,{label:{label:`${we.manualInput.labels.customerSatisfactionScore}${Ye}`,width:0,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"300px",variant:"small-description",data:we.tooltipTexts.customerSatisfactionScoreText,placement:"top",children:o.jsxRuntimeExports.jsx(Wo,{"data-testid":t.generateDataTestId("health-monitor-drawer-csat-info")})}),style:{marginRight:t.Space.sp2,width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(R,L)=>({input:{textAlign:L.selectProps.menuIsOpen===!1&&e.customerSatisfactionScore==null?"right":"left"}})},placeholder:ao.add,name:Bo(ht,rr),defaultValue:{allOptions:$i,selectedOption:e.customerSatisfactionScore},registerOptions:{required:!0,validate:(R,L)=>L.healthMonitorDetails.netPromoterScore.selectedOption?!0:R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(kn,{}),o.jsxRuntimeExports.jsx(bx,{"data-testid":t.generateDataTestId("health-monitor-drawer-external-exposure-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectPickerField,{label:{label:we.manualInput.labels.externalProductServices,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"265px",variant:"small-description",data:we.tooltipTexts.externalProductServicesText,placement:"top",children:o.jsxRuntimeExports.jsx(Wo,{"data-testid":t.generateDataTestId("health-monitor-drawer-external-exposure-info")})}),style:{marginRight:t.Space.sp2}},singleSelectPickerField:{placeholder:ao.add,name:Bo(ht,ir),defaultValue:{allOptions:J.companyHealthMetricDropDownOptions,selectedOption:e.externalProductServiceExposure},textAlignment:"right",registerOptions:{required:!0,validate:R=>R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(kn,{}),o.jsxRuntimeExports.jsxs(Zx,{"data-testid":t.generateDataTestId("health-monitor-drawer-additional-factors"),additionalNotesHidden:K.length===0,isFocused:S,children:[o.jsxRuntimeExports.jsx(t.LabeledGroupedMultiSelectField,{fullWidthSelect:!0,label:{label:`${we.manualInput.labels.additionalContributingFactorsLabel}${Ye}`,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"280px",variant:"small-description",data:we.tooltipTexts.additionalContributingFactorsText,placement:"top",children:o.jsxRuntimeExports.jsx(Wo,{"data-testid":t.generateDataTestId("health-monitor-drawer-additional-factors-info")})})},groupedMultiSelectField:{name:Bo(ht,ar),treeViewStructure:!0,registerOptions:{required:!1},defaultValue:{allOptions:Gi(r),selectedOptions:K},placeholder:ix,customStyleConfig:q,showSelectedInNewLines:!0},isMenuOpen:S,setIsMenuOpen:y,menuPortalEnabled:!0}),K.length!==0&&o.jsxRuntimeExports.jsxs(qx,{"data-testid":t.generateDataTestId("health-monitor-drawer-notes-composer"),children:[o.jsxRuntimeExports.jsx(ch,{}),o.jsxRuntimeExports.jsx(Xx,{ref:I,children:w&&Po.createPortal(o.jsxRuntimeExports.jsx(dm,{roomId:`cockpit_${p?.companyInfo.companyId}`,threadMetadata:{application:"cockpit",companyId:p?.companyInfo.companyId!=null?p.companyInfo.companyId:"",entityId:p?.companyInfo.companyId!=null?p.companyInfo.companyId:"",companyName:p?.companyInfo.name!=null?p.companyInfo.name:"",tab:"healthMonitor",isGlobalComment:!1,entityType:"healthMonitor.notes",url:window.location.href},composerPlaceholder:we.manualInput.placeholders.addANote,createThreadCallback:()=>{b(!1)},isSubmitComment:C}),w)})]})]})]})})})]}),o.jsxRuntimeExports.jsxs(Kx,{"data-testid":t.generateDataTestId("health-monitor-drawer-prefilled-section"),children:[o.jsxRuntimeExports.jsx(Fx,{"data-testid":t.generateDataTestId("health-monitor-drawer-prefilled-heading"),children:we.preFilledInput.header}),o.jsxRuntimeExports.jsxs(Qx,{"data-testid":t.generateDataTestId("health-monitor-drawer-runway"),children:[o.jsxRuntimeExports.jsx(lo,{children:we.preFilledInput.labels.runway}),h.runway!=null?J.isCompanyRunwayInfinite(h.runway)===!0?o.jsxRuntimeExports.jsx(eh,{}):o.jsxRuntimeExports.jsx(Kt,{children:Wi(h.runway.runwayMonths)}):o.jsxRuntimeExports.jsx(Kt,{children:we.notApplicable})]}),o.jsxRuntimeExports.jsxs(_o,{"data-testid":t.generateDataTestId("health-monitor-drawer-dashboard-last-seen"),children:[o.jsxRuntimeExports.jsx(lo,{children:we.preFilledInput.labels.dashboardLastSeen}),o.jsxRuntimeExports.jsx(Kt,{children:h.dashboardLastVisit??we.notApplicable})]}),o.jsxRuntimeExports.jsxs(_o,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-report-sent"),children:[o.jsxRuntimeExports.jsx(lo,{children:we.preFilledInput.labels.lastReportSent}),o.jsxRuntimeExports.jsx(Kt,{children:h.lastReportSent??we.notApplicable})]}),o.jsxRuntimeExports.jsxs(_o,{"data-testid":t.generateDataTestId("health-monitor-drawer-product-services"),children:[o.jsxRuntimeExports.jsx(lo,{children:we.preFilledInput.labels.zeniProductServices}),o.jsxRuntimeExports.jsx(Kt,{children:o.jsxRuntimeExports.jsx(Ui,{productVerticals:p?.companyHealthMetric.verticalProductServices??[],testIdSuffix:p?.companyInfo.companyId})})]}),o.jsxRuntimeExports.jsxs(_o,{"data-testid":t.generateDataTestId("health-monitor-drawer-days-to-renewal"),children:[o.jsxRuntimeExports.jsx(lo,{children:we.preFilledInput.labels.daysToRenewal}),o.jsxRuntimeExports.jsx(Kt,{children:h.renewalDate??we.notApplicable})]}),o.jsxRuntimeExports.jsx(Jx,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-engagements"),children:o.jsxRuntimeExports.jsx(t.LabeledReadOnlyTextField,{label:{label:`${cx}${Ye}`},text:o.jsxRuntimeExports.jsx(rh,{children:h.lastEngagements.length>0?h.lastEngagements.map((R,L)=>o.jsxRuntimeExports.jsx(ih,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement",String(L)),children:o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`,color:t.Colors.heroDark},title:o.jsxRuntimeExports.jsx(lh,{children:R.type==="email"?o.jsxRuntimeExports.jsxs(gr,{children:[o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[lr,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.subject})]}),o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[tx,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.from})]}),o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[ex,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.to})]}),R.cc!=""?o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[ox,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.cc})]}):null]}):o.jsxRuntimeExports.jsxs(gr,{children:[o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[lr,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.subject})]}),o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[nx,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.hostName})]}),o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[sx,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.attendees})]})]})}),placement:"left",children:o.jsxRuntimeExports.jsxs(ah,{children:[o.jsxRuntimeExports.jsxs(Ex,{children:[R.type==="email"?o.jsxRuntimeExports.jsx(ph,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement-email-icon",String(L))}):o.jsxRuntimeExports.jsx(dh,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement-meeting-icon",String(L))}),o.jsxRuntimeExports.jsx(yx,{children:R.type==="email"?dr.email:dr.meeting})]}),o.jsxRuntimeExports.jsx(uh,{className:"engagementDot"}),o.jsxRuntimeExports.jsx($x,{children:R.scheduledAt?.utc(!0).local().format(hx.visual.MMMDCommaYYYYformat)??cr})]},`${o.nanoid()}_${L}}`)})},L)):cr}),style:{width:"100%"}})})]})]}),J.hasCompanyHealthMetricFormFieldChanged(p?.companyHealthMetric,m?.companyHealthMetricLocalData)===!0||x===!1?o.jsxRuntimeExports.jsx(Rx,{"data-testid":t.generateDataTestId("health-monitor-drawer-footer"),children:o.jsxRuntimeExports.jsx(t.Footer,{style:{zIndex:2,paddingTop:t.Space.sp3,paddingBottom:t.Space.sp3},formId:or(nr),primaryBtn:{label:ao.save,style:{minWidth:112},isLoading:m?.saveStatus?.fetchState==="In-Progress"},cancelBtn:{label:ao.cancel,style:{minWidth:112},onClick:G}})}):null]})}const Sx=(e,n)=>({[ht]:{netPromoterScore:{selectedOption:e.netPromoterScore,allOptions:Ri},customerSatisfactionScore:{selectedOption:e.customerSatisfactionScore,allOptions:$i},externalProductServiceExposure:{selectedOption:e.externalProductServiceExposure,allOptions:J.companyHealthMetricDropDownOptions},additionalChurnFactors:{selectedOptions:Yi(e.additionalChurnFactors),allOptions:Gi(n)}}}),yx=s.div``,fx=s.div``,Cx=s.div``,jx=s.div``,bx=s.div``,Rx=s.div``,$x=s.div`
|
|
1502
|
+
`,Jm=s(t.SmallRegular)``,ao=t.appLocale.getLocalizedStrings().common,Bo=(e,n)=>`${e}.${n}`,or=e=>`${e}_form`,ht="healthMonitorDetails",nr="healthMonitorPage",sr="netPromoterScore",rr="customerSatisfactionScore",ir="externalProductServiceExposure",ar="additionalChurnFactors",Gi=e=>[{label:px,options:e.increasingChurnProbability.map(n=>({label:n.value,value:n.code}))},{label:dx,options:e.decreasingChurnProbability.map(n=>({label:n.value,value:n.code}))}],Yi=e=>e==null?[]:e.increasingChurnProbability.map(n=>n.code).concat(e.decreasingChurnProbability.map(n=>n.code)),{common:{to:ex,from:tx,cc:ox,host:nx,attendees:sx,texts:{subject:lr,addMore:rx,select:ix},strings:{colon:Ye,hyphen:cr,comma:ax,space:lx}},cockpit:{health:{detailPage:ke,common:{engagementTypes:dr,labels:{lastEngagements:cx,factorsThatDecreaseChurnProbability:dx,factorsThatIncreaseChurnProbability:px,contributingFactors:ux,increaseChurnProbability:mx,decreasingChurnProbability:xx}}}},dateFormat:hx}=t.appLocale.getLocalizedStrings();function gx({localData:e,companyHealthMetricViewSelector:n,additionalChurnFactorsOptions:r,analytics:i,urlSource:a,onCloseDrawer:d,onSaveChangesToLocalStore:l,onSaveClick:c}){const{selectedCompanyDetail:p,localFormDataAndStatusByCompanyId:m}=n,[x,g]=u.useState(!1),h=_i(p),[C,b]=u.useState(!1),[S,y]=u.useState(!1),j=o.useForm({mode:"all",defaultValues:Sx(e,r),reValidateMode:"onBlur"}),f=u.useRef(null);function E(R){p!=null&&i.trackCockpitHealthMonitorChurnFormClicked(R,{companyId:p.companyInfo.companyId,companyName:p.companyInfo.name,zeniProductAndServicesCount:p.noOfProductVerticalsEnabled,daysToRenewal:bn(p.companyHealthMetric.subscriptionRenewalDate)??null,netPromoterScore:m?.companyHealthMetricLocalData.netPromoterScore??null,customerSatisfactionScore:m?.companyHealthMetricLocalData.customerSatisfactionScore??null,externalServicesExposure:m?.companyHealthMetricLocalData.externalProductServiceExposure??null,runwayMonths:ee.isCompanyRunwayInfinite(p.companyHealthMetric.runway)===!0?1e6:p.companyHealthMetric.runway===void 0?null:p.companyHealthMetric.runway.runwayMonths??null,dashBoardLastSeen:bn(p.companyHealthMetric.customerLastDashboardVisit)??null,lastReportSent:bn(p.managementInfo.lastReportSentDate)??null,churnProbability:p.companyHealthMetric.churnProbabilityPercentage??null})}const $=j.handleSubmit(()=>{E("Save"),f?.current&&f.current.scrollTo({top:0,behavior:"instant"}),b(!0),g(!0),c()}),A=async(R,T)=>{if(R!=null){const V={...T},W=V[ht][ar].selectedOptions,v={netPromoterScore:V[ht][sr]?.selectedOption,customerSatisfactionScore:V[ht][rr]?.selectedOption,externalProductServiceExposure:V[ht][ir]?.selectedOption,additionalChurnFactors:{increasingChurnProbability:r.increasingChurnProbability.filter(L=>W.indexOf(L.code)!=-1),decreasingChurnProbability:r.decreasingChurnProbability.filter(L=>W.indexOf(L.code)!=-1)}};l(v)}},I=u.useRef(null),w=u.useRef(null),[k,N]=u.useState(null),D=u.useRef(null),G=Yi(e.additionalChurnFactors);u.useEffect(()=>(w.current=setTimeout(()=>{I.current&&(N(I.current),w.current&&clearTimeout(w.current))},10),()=>{w.current!=null&&clearTimeout(w.current)}),[G]),u.useEffect(()=>{const R=j.watch((T,{name:V})=>{V!=null&&T!=null&&o.defer(()=>A(V,T))});return()=>{R.unsubscribe()}}),u.useEffect(()=>{if(p!=null){const T=p.controllers.map(V=>`${V.firstName} ${V.lastName}`);a||i.trackCockpitHealthMonitorRowClicked(p.companyInfo.companyId,p.companyInfo.name,T,p.companyHealthMetric.netPromoterScore,p.companyHealthMetric.customerSatisfactionScore,p.companyHealthMetric.churnProbabilityPercentage)}},[]);function O(R){return R!=null?`${ke.churnProbabilityTexts.churnProbability} ${ke.churnProbabilityTexts.is} ${h.churnProbabilityPercentage}${ke.churnProbabilityTexts.percent}`:`${ke.churnProbabilityTexts.churnProbability} ${ke.churnProbabilityTexts.percent}`}function Z(){E("Cancel"),d()}const q={valueContainer:R=>({...R,padding:`2px ${t.Space.sp3}`,overflow:"unset"}),multiValue:R=>({...R,margin:0})};return o.jsxRuntimeExports.jsxs(Hx,{ref:f,"data-testid":t.generateDataTestId("health-monitor-drawer"),children:[o.jsxRuntimeExports.jsxs(Bx,{"data-testid":t.generateDataTestId("health-monitor-drawer-header"),children:[o.jsxRuntimeExports.jsx(Wx,{"data-testid":t.generateDataTestId("health-monitor-drawer-title"),children:`${p?.companyInfo.name}${ke.heading}`}),o.jsxRuntimeExports.jsx(vx,{"data-testid":t.generateDataTestId("health-monitor-drawer-close-button"),onClick:Z,children:o.jsxRuntimeExports.jsx(wx,{})})]}),o.jsxRuntimeExports.jsxs(Ux,{children:[n.localFormDataAndStatusByCompanyId?.saveStatus?.fetchState==="Error"?o.jsxRuntimeExports.jsx(th,{"data-testid":t.generateDataTestId("health-monitor-drawer-error"),children:o.jsxRuntimeExports.jsxs(oh,{children:[o.jsxRuntimeExports.jsx(sh,{}),n.localFormDataAndStatusByCompanyId.saveStatus.error?.message!=null?o.jsxRuntimeExports.jsx(nh,{"data-testid":t.generateDataTestId("health-monitor-drawer-error-text"),children:n.localFormDataAndStatusByCompanyId.saveStatus.error?.message}):null]})}):null,o.jsxRuntimeExports.jsx(Tx,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-section"),children:m?.saveStatus?.fetchState==="In-Progress"?o.jsxRuntimeExports.jsxs(kx,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-loader"),children:[o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0}),o.jsxRuntimeExports.jsx(t.ExtraLargeRegular,{children:ke.calculatingProbability})]}):o.jsxRuntimeExports.jsxs(_x,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-box"),children:[o.jsxRuntimeExports.jsx(Vx,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-heading"),children:O(h.churnProbabilityPercentage)}),o.jsxRuntimeExports.jsx(fx,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-meter"),children:o.jsxRuntimeExports.jsx(Bi,{barHeight:32,percentage:h.churnProbabilityPercentage})}),o.jsxRuntimeExports.jsx(Px,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-reasons"),children:p?.companyHealthMetric.churnProbabilityPercentage!=null&&p?.companyHealthMetric.churnProbabilityReason.length!==0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Ix,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-contributing-heading"),children:ux}),p.companyHealthMetric.churnProbabilityReason.length!==0||p.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(ur,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-increasing-factors"),children:[o.jsxRuntimeExports.jsx(pr,{children:`${mx}${Ye}`}),o.jsxRuntimeExports.jsxs(xr,{children:[p.companyHealthMetric.churnProbabilityReason.map((R,T)=>o.jsxRuntimeExports.jsx(vn,{children:o.jsxRuntimeExports.jsx(wn,{children:R.text})},`${o.nanoid()}_${T}}`)),p.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((R,T)=>o.jsxRuntimeExports.jsxs(vn,{children:[o.jsxRuntimeExports.jsx(wn,{children:R.value}),o.jsxRuntimeExports.jsx(mr,{children:"Newly added"})]},`${o.nanoid()}_${T}}`))]})]}):null,p?.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(ur,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-decreasing-factors"),children:[o.jsxRuntimeExports.jsx(pr,{children:`${xx}${Ye}`}),o.jsxRuntimeExports.jsx(xr,{children:p.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((R,T)=>o.jsxRuntimeExports.jsxs(vn,{children:[o.jsxRuntimeExports.jsx(wn,{children:R.value}),o.jsxRuntimeExports.jsx(mr,{children:"Newly added"})]},`${o.nanoid()}_${T}}`))})]}):null,o.jsxRuntimeExports.jsxs(Dx,{"data-testid":t.generateDataTestId("health-monitor-drawer-add-more-button"),onClick:()=>{t.scrollContainerToTargetAdjusted(D?.current,f?.current),setTimeout(()=>{y(!0)},500)},ref:D,children:[o.jsxRuntimeExports.jsx(Ax,{}),o.jsxRuntimeExports.jsx(Lx,{children:rx})]})]}):null})]})}),o.jsxRuntimeExports.jsxs(Gx,{"data-testid":t.generateDataTestId("health-monitor-drawer-form-container"),children:[o.jsxRuntimeExports.jsxs(Ox,{children:[o.jsxRuntimeExports.jsxs(Mx,{children:[o.jsxRuntimeExports.jsx(zx,{"data-testid":t.generateDataTestId("health-monitor-drawer-manual-input-heading"),children:ke.manualInput.header}),o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"250px",variant:"small-description",data:ke.tooltipTexts.manualInputText,placement:"top",children:o.jsxRuntimeExports.jsx(Wo,{"data-testid":t.generateDataTestId("health-monitor-drawer-manual-input-info"),style:{marginTop:t.Space.sp1,marginRight:t.Space.sp0}})})]}),h.companyEngagementMetricsUpdatedAt!=null&&n.localFormDataAndStatusByCompanyId?.saveStatus?.fetchState!=="In-Progress"?o.jsxRuntimeExports.jsx(Nx,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-updated"),children:h.updatedByUserName!=null?o.jsxRuntimeExports.jsxs(hr,{children:[`${ke.lastUpdatedBy}${Ye} ${h.updatedByUserName}`,o.jsxRuntimeExports.jsx(ms,{}),`${h.companyEngagementMetricsUpdatedAt.date}${ax}${lx}${h.companyEngagementMetricsUpdatedAt.time}`]}):o.jsxRuntimeExports.jsxs(hr,{children:[`${ke.lastUpdatedAt}${Ye} ${h.companyEngagementMetricsUpdatedAt.date}`,o.jsxRuntimeExports.jsx(ms,{}),`${h.companyEngagementMetricsUpdatedAt.time}`]})}):null]}),o.jsxRuntimeExports.jsx(o.FormProvider,{...j,children:o.jsxRuntimeExports.jsx("form",{id:or(nr),onSubmit:$,children:o.jsxRuntimeExports.jsxs(Yx,{"data-testid":t.generateDataTestId("health-monitor-drawer-form-fields"),children:[o.jsxRuntimeExports.jsx(Cx,{"data-testid":t.generateDataTestId("health-monitor-drawer-nps-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectNumericField,{label:{label:`${ke.manualInput.labels.netPromoterScore}${Ye}`,width:0,style:{width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(R,T)=>({input:{textAlign:T.selectProps.menuIsOpen===!1&&e.netPromoterScore==null?"right":"left"}})},placeholder:ao.add,name:Bo(ht,sr),defaultValue:{allOptions:Ri,selectedOption:e.netPromoterScore},registerOptions:{required:!0,validate:(R,T)=>T.healthMonitorDetails.customerSatisfactionScore.selectedOption?!0:R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(kn,{}),o.jsxRuntimeExports.jsx(jx,{"data-testid":t.generateDataTestId("health-monitor-drawer-csat-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectNumericField,{label:{label:`${ke.manualInput.labels.customerSatisfactionScore}${Ye}`,width:0,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"300px",variant:"small-description",data:ke.tooltipTexts.customerSatisfactionScoreText,placement:"top",children:o.jsxRuntimeExports.jsx(Wo,{"data-testid":t.generateDataTestId("health-monitor-drawer-csat-info")})}),style:{marginRight:t.Space.sp2,width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(R,T)=>({input:{textAlign:T.selectProps.menuIsOpen===!1&&e.customerSatisfactionScore==null?"right":"left"}})},placeholder:ao.add,name:Bo(ht,rr),defaultValue:{allOptions:$i,selectedOption:e.customerSatisfactionScore},registerOptions:{required:!0,validate:(R,T)=>T.healthMonitorDetails.netPromoterScore.selectedOption?!0:R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(kn,{}),o.jsxRuntimeExports.jsx(bx,{"data-testid":t.generateDataTestId("health-monitor-drawer-external-exposure-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectPickerField,{label:{label:ke.manualInput.labels.externalProductServices,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"265px",variant:"small-description",data:ke.tooltipTexts.externalProductServicesText,placement:"top",children:o.jsxRuntimeExports.jsx(Wo,{"data-testid":t.generateDataTestId("health-monitor-drawer-external-exposure-info")})}),style:{marginRight:t.Space.sp2}},singleSelectPickerField:{placeholder:ao.add,name:Bo(ht,ir),defaultValue:{allOptions:ee.companyHealthMetricDropDownOptions,selectedOption:e.externalProductServiceExposure},textAlignment:"right",registerOptions:{required:!0,validate:R=>R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(kn,{}),o.jsxRuntimeExports.jsxs(Zx,{"data-testid":t.generateDataTestId("health-monitor-drawer-additional-factors"),additionalNotesHidden:G.length===0,isFocused:S,children:[o.jsxRuntimeExports.jsx(t.LabeledGroupedMultiSelectField,{fullWidthSelect:!0,label:{label:`${ke.manualInput.labels.additionalContributingFactorsLabel}${Ye}`,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"280px",variant:"small-description",data:ke.tooltipTexts.additionalContributingFactorsText,placement:"top",children:o.jsxRuntimeExports.jsx(Wo,{"data-testid":t.generateDataTestId("health-monitor-drawer-additional-factors-info")})})},groupedMultiSelectField:{name:Bo(ht,ar),treeViewStructure:!0,registerOptions:{required:!1},defaultValue:{allOptions:Gi(r),selectedOptions:G},placeholder:ix,customStyleConfig:q,showSelectedInNewLines:!0},isMenuOpen:S,setIsMenuOpen:y,menuPortalEnabled:!0}),G.length!==0&&o.jsxRuntimeExports.jsxs(qx,{"data-testid":t.generateDataTestId("health-monitor-drawer-notes-composer"),children:[o.jsxRuntimeExports.jsx(ch,{}),o.jsxRuntimeExports.jsx(Xx,{ref:I,children:k&&Po.createPortal(o.jsxRuntimeExports.jsx(dm,{roomId:`cockpit_${p?.companyInfo.companyId}`,threadMetadata:{application:"cockpit",companyId:p?.companyInfo.companyId!=null?p.companyInfo.companyId:"",entityId:p?.companyInfo.companyId!=null?p.companyInfo.companyId:"",companyName:p?.companyInfo.name!=null?p.companyInfo.name:"",tab:"healthMonitor",isGlobalComment:!1,entityType:"healthMonitor.notes",url:window.location.href},composerPlaceholder:ke.manualInput.placeholders.addANote,createThreadCallback:()=>{b(!1)},isSubmitComment:C}),k)})]})]})]})})})]}),o.jsxRuntimeExports.jsxs(Kx,{"data-testid":t.generateDataTestId("health-monitor-drawer-prefilled-section"),children:[o.jsxRuntimeExports.jsx(Fx,{"data-testid":t.generateDataTestId("health-monitor-drawer-prefilled-heading"),children:ke.preFilledInput.header}),o.jsxRuntimeExports.jsxs(Qx,{"data-testid":t.generateDataTestId("health-monitor-drawer-runway"),children:[o.jsxRuntimeExports.jsx(lo,{children:ke.preFilledInput.labels.runway}),h.runway!=null?ee.isCompanyRunwayInfinite(h.runway)===!0?o.jsxRuntimeExports.jsx(eh,{}):o.jsxRuntimeExports.jsx(Kt,{children:Wi(h.runway.runwayMonths)}):o.jsxRuntimeExports.jsx(Kt,{children:ke.notApplicable})]}),o.jsxRuntimeExports.jsxs(_o,{"data-testid":t.generateDataTestId("health-monitor-drawer-dashboard-last-seen"),children:[o.jsxRuntimeExports.jsx(lo,{children:ke.preFilledInput.labels.dashboardLastSeen}),o.jsxRuntimeExports.jsx(Kt,{children:h.dashboardLastVisit??ke.notApplicable})]}),o.jsxRuntimeExports.jsxs(_o,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-report-sent"),children:[o.jsxRuntimeExports.jsx(lo,{children:ke.preFilledInput.labels.lastReportSent}),o.jsxRuntimeExports.jsx(Kt,{children:h.lastReportSent??ke.notApplicable})]}),o.jsxRuntimeExports.jsxs(_o,{"data-testid":t.generateDataTestId("health-monitor-drawer-product-services"),children:[o.jsxRuntimeExports.jsx(lo,{children:ke.preFilledInput.labels.zeniProductServices}),o.jsxRuntimeExports.jsx(Kt,{children:o.jsxRuntimeExports.jsx(Ui,{productVerticals:p?.companyHealthMetric.verticalProductServices??[],testIdSuffix:p?.companyInfo.companyId})})]}),o.jsxRuntimeExports.jsxs(_o,{"data-testid":t.generateDataTestId("health-monitor-drawer-days-to-renewal"),children:[o.jsxRuntimeExports.jsx(lo,{children:ke.preFilledInput.labels.daysToRenewal}),o.jsxRuntimeExports.jsx(Kt,{children:h.renewalDate??ke.notApplicable})]}),o.jsxRuntimeExports.jsx(Jx,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-engagements"),children:o.jsxRuntimeExports.jsx(t.LabeledReadOnlyTextField,{label:{label:`${cx}${Ye}`},text:o.jsxRuntimeExports.jsx(rh,{children:h.lastEngagements.length>0?h.lastEngagements.map((R,T)=>o.jsxRuntimeExports.jsx(ih,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement",String(T)),children:o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`,color:t.Colors.heroDark},title:o.jsxRuntimeExports.jsx(lh,{children:R.type==="email"?o.jsxRuntimeExports.jsxs(gr,{children:[o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[lr,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.subject})]}),o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[tx,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.from})]}),o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[ex,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.to})]}),R.cc!=""?o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[ox,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.cc})]}):null]}):o.jsxRuntimeExports.jsxs(gr,{children:[o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[lr,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.subject})]}),o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[nx,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.hostName})]}),o.jsxRuntimeExports.jsxs(wt,{children:[o.jsxRuntimeExports.jsxs(kt,{children:[sx,Ye]}),o.jsxRuntimeExports.jsx(Tt,{children:R.attendees})]})]})}),placement:"left",children:o.jsxRuntimeExports.jsxs(ah,{children:[o.jsxRuntimeExports.jsxs(Ex,{children:[R.type==="email"?o.jsxRuntimeExports.jsx(ph,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement-email-icon",String(T))}):o.jsxRuntimeExports.jsx(dh,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement-meeting-icon",String(T))}),o.jsxRuntimeExports.jsx(yx,{children:R.type==="email"?dr.email:dr.meeting})]}),o.jsxRuntimeExports.jsx(uh,{className:"engagementDot"}),o.jsxRuntimeExports.jsx($x,{children:R.scheduledAt?.utc(!0).local().format(hx.visual.MMMDCommaYYYYformat)??cr})]},`${o.nanoid()}_${T}}`)})},T)):cr}),style:{width:"100%"}})})]})]}),ee.hasCompanyHealthMetricFormFieldChanged(p?.companyHealthMetric,m?.companyHealthMetricLocalData)===!0||x===!1?o.jsxRuntimeExports.jsx(Rx,{"data-testid":t.generateDataTestId("health-monitor-drawer-footer"),children:o.jsxRuntimeExports.jsx(t.Footer,{style:{zIndex:2,paddingTop:t.Space.sp3,paddingBottom:t.Space.sp3},formId:or(nr),primaryBtn:{label:ao.save,style:{minWidth:112},isLoading:m?.saveStatus?.fetchState==="In-Progress"},cancelBtn:{label:ao.cancel,style:{minWidth:112},onClick:Z}})}):null]})}const Sx=(e,n)=>({[ht]:{netPromoterScore:{selectedOption:e.netPromoterScore,allOptions:Ri},customerSatisfactionScore:{selectedOption:e.customerSatisfactionScore,allOptions:$i},externalProductServiceExposure:{selectedOption:e.externalProductServiceExposure,allOptions:ee.companyHealthMetricDropDownOptions},additionalChurnFactors:{selectedOptions:Yi(e.additionalChurnFactors),allOptions:Gi(n)}}}),yx=s.div``,fx=s.div``,Cx=s.div``,jx=s.div``,bx=s.div``,Rx=s.div``,$x=s.div`
|
|
1501
1503
|
min-width: 100px;
|
|
1502
1504
|
`,Ex=s.div`
|
|
1503
1505
|
min-width: 80px;
|
|
@@ -1903,7 +1905,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1903
1905
|
&:hover {
|
|
1904
1906
|
color: ${e=>e.theme.colors.primary};
|
|
1905
1907
|
}
|
|
1906
|
-
`,jh=e=>
|
|
1908
|
+
`,jh=e=>ae.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ae.createElement("path",{d:"M7.07568 15.1944H1.45068C1.28492 15.1944 1.12595 15.1285 1.00874 15.0113C0.891532 14.8941 0.825684 14.7351 0.825684 14.5694V1.44437C0.825684 1.27861 0.891532 1.11964 1.00874 1.00243C1.12595 0.885219 1.28492 0.819371 1.45068 0.819371H9.75881C9.9242 0.818742 10.0831 0.883694 10.2007 0.999996L12.5176 3.31687C12.6348 3.43405 12.7006 3.593 12.7007 3.75875V5.81937",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M3.32568 9.19999L5.17193 7.35374C5.26025 7.2656 5.37635 7.21073 5.50051 7.19843C5.62468 7.18612 5.74928 7.21715 5.85318 7.28624L6.72381 7.86687C6.83014 7.93767 6.95812 7.96849 7.08503 7.95384C7.21193 7.93919 7.32953 7.88003 7.41693 7.78687L9.12818 5.96124",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M3.32568 4.56938V10.8194H5.82568",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),ae.createElement("path",{d:"M13.0242 9.84985H10.4955C9.11614 9.84985 8.65637 11.1335 8.65637 12.1487C8.68901 12.8186 8.93013 13.4616 9.34603 13.9878V12.8384C9.34603 12.3786 9.57591 12.1487 10.4955 12.1487H13.0242V13.528L15.323 10.9993L13.0242 8.47054V9.84985Z",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),{cockpit:{health:{healthMonitorFiltersHeaderInfoText:{showing:bh,outOf:Rh,customers:$h}}},common:{headers:{comments:Eh},analytics:vh,strings:{space:wh}},collaboration:{threads:{placeholder:{addANewComment:kh,replyAComment:Th},tooltip:{resolveComment:Ph,unResolveComment:Ih}}}}=t.appLocale.getLocalizedStrings();function Lh({healthView:e,mixpanelUrl:n,onRowClick:r,onColumnSortConfigChanged:i,initialOpenThreadRequest:a}){const d=t.useWindowSizeContext(),l=u.useRef(null),[c,p]=u.useState(null),{uiState:m}=e,[x,g]=u.useState(null),{unfilteredCompanyCount:h}=e,{companies:C}=e,{setOpenThread:b,setRequestToOpenThread:S,requestToOpenThread:y,isLoading:j}=u.useContext(t.ThreadsContext),[f,E]=u.useState(void 0),$=u.useRef([]),A=!(d==="small"||d==="medium-compact"),I=D=>e.companies[D].companyInfo.name.length>Wt?Le+32:Le,w=u.useMemo(()=>({makeCompanyNameSticky:A,uiState:m,onColumnSortConfigChanged:i}),[A,m,i]),k=u.useCallback((D,G,O)=>{const Z=e.companies.findIndex(R=>R.companyInfo.companyId===D),q=Nt.findIndex(R=>R.key===G);Z!==-1&&q!==-1&&($.current[Z]==null?$.current[Z]=[O]:$.current[Z][q]=O)},[e.companies]);u.useEffect(()=>{l.current&&l.current.resetAfterIndex(0)},[e]),u.useEffect(()=>{a!=null&&e.fetchState==="Completed"&&j===!1&&S(a)},[a,e.fetchState,j,S]),u.useEffect(()=>{if(y!=null&&c!=null){const{companyId:D,entityType:G}=y,[O,Z]=G.split("."),q=e.companies.findIndex(W=>W.companyInfo.companyId===D),R=Nt.findIndex(W=>W.key===Z);q!==-1&&!(c.visibleStartIndex<=q&&c.visibleStopIndex>=q)&&l.current?.scrollToItem(q,"center"),setTimeout(()=>{const W=$.current[q]?.[0]?.getBoundingClientRect().bottom,v=$.current[q]?.[0]?.getBoundingClientRect().top;W!=null&&v!=null&&(window.innerHeight>=W&&window.innerHeight>=v||v<0)&&$.current[q][R]?.scrollIntoView({block:"center",behavior:"auto"})},0);const V=setInterval(()=>{const W=$.current[q]?.[R]?.getBoundingClientRect().left,v=$.current[q]?.[R]?.getBoundingClientRect().right,L=$.current[q]?.[R]?.offsetWidth;if(W!=null&&L!=null&&v!=null&&(W<window.innerWidth-L||v<window.innerWidth)){clearInterval(V);const J=y.threadId,re=y.onThreadShownCallback;J&&(S(null),b(y.threadId),re?.())}},500);setTimeout(()=>{clearInterval(V),S(null)},2e3)}},[y,c,b,S]);const N=()=>{window.open(n,"_blank")};return o.jsxRuntimeExports.jsxs(Dh,{companyNameSticky:A,"data-testid":t.generateDataTestId("health-monitor-list-view"),children:[A&&o.jsxRuntimeExports.jsxs(Bh,{"data-testid":t.generateDataTestId("health-monitor-list-summary-bar"),children:[o.jsxRuntimeExports.jsxs(Wh,{"data-testid":t.generateDataTestId("health-monitor-list-summary-text"),children:[bh," ",o.jsxRuntimeExports.jsx(Fh,{children:C.length})," ",Rh,wh,h," ",$h]}),o.jsxRuntimeExports.jsx(_h,{"data-testid":t.generateDataTestId("health-monitor-list-analytics-button"),children:o.jsxRuntimeExports.jsx(t.Button,{label:vh,variant:"outline",onClick:N,size:"small",prefixIcon:o.jsxRuntimeExports.jsx(Uh,{})})})]}),o.jsxRuntimeExports.jsx(Mh,{companyNameSticky:A,"data-testid":t.generateDataTestId("health-monitor-list-container"),children:o.jsxRuntimeExports.jsxs(Zi.Provider,{value:w,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:D,width:G})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{innerElementType:Xi,height:D,width:G,ref:l,overscanCount:Bt,itemSize:I,onItemsRendered:O=>p(O),itemData:{healthView:e,makeCompanyNameSticky:A,addThreadRequestThreadId:f,setElementRef:k,setAddThreadRequestThreadId:E,onRowClick:r,setNoteData:g},itemCount:e.companies.length,children:Ah})}),x!=null?o.jsxRuntimeExports.jsx(Vh,{"data-testid":t.generateDataTestId("health-monitor-notes-drawer"),children:o.jsxRuntimeExports.jsx(Xe.RoomProvider,{id:x.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${x.companyName} ${Eh}`,filter:{application:"cockpit",companyId:x.companyId,entityType:x.entityType,isGlobalComment:!1,tab:"healthMonitor"},isLoading:!1,threadMetadata:{companyName:x.companyName,companyId:x.companyId,entityId:x.companyId,entityType:x.entityType,isGlobalComment:!1,application:"cockpit",tab:"healthMonitor",url:window.location.href},textOverrides:{composerPlaceholder:kh,replyComposerPlaceholder:Th,threadResolve:Ph,threadUnResolve:Ih},onThreadClick:D=>null,onCloseAllThreadsDrawer:()=>g(null)})})}):null]})})]})}const Zi=u.createContext(void 0),Ah=({index:e,style:n,data:r})=>{const{healthView:i,makeCompanyNameSticky:a,onRowClick:d,addThreadRequestThreadId:l,setElementRef:c,setNoteData:p,setAddThreadRequestThreadId:m}=r,x=i.companies[e],{companyId:g}=x.companyInfo;return o.jsxRuntimeExports.jsx(Oh,{style:{...n,width:"fit-content",minWidth:"100%",padding:`${t.Space.sp0} ${t.Space.sp8} ${t.Space.sp3} ${t.Space.sp0}`},children:o.jsxRuntimeExports.jsx(km,{companyView:i.companies[e],healthView:i,totalHeight:typeof n.height=="number"?n.height:Le,companyNameSticky:a,addThreadRequestThreadId:l,setNoteData:p,setElementRef:c,setAddThreadRequestThreadId:m,onRowClick:d})},g)},Xi=u.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:d,uiState:l,onColumnSortConfigChanged:c}=u.useContext(Zi);return o.jsxRuntimeExports.jsxs(Nh,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(xh,{companyNameSticky:d,onColumnSortConfigChanged:c,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),o.jsxRuntimeExports.jsx(zh,{children:r})]})});Xi.displayName="Health Monitor view inner element type";const Dh=s.div`
|
|
1907
1909
|
width: 100%;
|
|
1908
1910
|
height: 100%;
|
|
1909
1911
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -1958,7 +1960,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1958
1960
|
`,Qh=s.div``,Jh=s.div``,eg=s.div`
|
|
1959
1961
|
height: calc(100% - 75px);
|
|
1960
1962
|
padding: ${e=>`${t.Space.sp0} ${t.Space.sp0} ${t.Space.sp0} ${He.cockpitLeftPadding.valuePx(e.windowSize)}`};
|
|
1961
|
-
`,at=t.appLocale.getLocalizedStrings().cockpit.subscription.header,jt=[{key:"companyName",value:at.name,sortOrder:"ascending",width:new t.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"status",value:at.status,sortOrder:"ascending",width:new t.ResponsiveSized(149,149),isThreadAllowed:!0},{key:"controller",value:at.controller,sortOrder:"ascending",width:new t.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"plans",value:at.plans,sortOrder:"ascending",width:new t.ResponsiveSized(374,374),isThreadAllowed:!0},{key:"planLowerLimit",value:at.planLowerLimit,sortOrder:"ascending",width:new t.ResponsiveSized(164,164),isThreadAllowed:!0},{key:"planHigherLimit",value:at.planHigherLimit,sortOrder:"ascending",width:new t.ResponsiveSized(164,164),isThreadAllowed:!0},{key:"avg2MonthExpenses",value:at.avg2MonthExpenses,sortOrder:"ascending",width:new t.ResponsiveSized(201,201),isThreadAllowed:!0},{key:"addons",value:at.addons,sortOrder:"ascending",width:new t.ResponsiveSized(374,374),isThreadAllowed:!0},{key:"upgradeStatus",value:at.upgradeStatus,sortOrder:"ascending",width:new t.ResponsiveSized(180,180),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:at.monthlyRecurringRevenue,sortOrder:"ascending",width:new t.ResponsiveSized(196,196),isThreadAllowed:!0}];jt.map(e=>e.key);function tg({companyNameSticky:e,sortConfig:n,onColumnSortConfigChanged:r}){const i=t.useWindowSizeContext(),[a,d]=u.useState(o.cloneDeep(jt));u.useEffect(()=>{const c=[...a];for(const p of c)p.key===n.sortKey?p.sortOrder=n.sortOrder:p.sortOrder="ascending";d(c)},[n.sortKey,n.sortOrder]);const l=(c,p)=>{let m=p;n.sortKey===c&&(m=p==="ascending"?"descending":"ascending"),r(c,m)};return o.jsxRuntimeExports.jsx(ng,{height:Ft,children:a.map(c=>o.jsxRuntimeExports.jsxs(sg,{companyNameSticky:e&&c.key==="companyName",sortDataValue:n.sortKey,actualDataValue:c.key,wrapperWidth:c.width,windowSize:i,children:[o.jsxRuntimeExports.jsxs(lg,{onClick:()=>l(
|
|
1963
|
+
`,at=t.appLocale.getLocalizedStrings().cockpit.subscription.header,jt=[{key:"companyName",value:at.name,sortOrder:"ascending",width:new t.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"status",value:at.status,sortOrder:"ascending",width:new t.ResponsiveSized(149,149),isThreadAllowed:!0},{key:"controller",value:at.controller,sortOrder:"ascending",width:new t.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"plans",value:at.plans,sortOrder:"ascending",width:new t.ResponsiveSized(374,374),isThreadAllowed:!0},{key:"planLowerLimit",value:at.planLowerLimit,sortOrder:"ascending",width:new t.ResponsiveSized(164,164),isThreadAllowed:!0},{key:"planHigherLimit",value:at.planHigherLimit,sortOrder:"ascending",width:new t.ResponsiveSized(164,164),isThreadAllowed:!0},{key:"avg2MonthExpenses",value:at.avg2MonthExpenses,sortOrder:"ascending",width:new t.ResponsiveSized(201,201),isThreadAllowed:!0},{key:"addons",value:at.addons,sortOrder:"ascending",width:new t.ResponsiveSized(374,374),isThreadAllowed:!0},{key:"upgradeStatus",value:at.upgradeStatus,sortOrder:"ascending",width:new t.ResponsiveSized(180,180),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:at.monthlyRecurringRevenue,sortOrder:"ascending",width:new t.ResponsiveSized(196,196),isThreadAllowed:!0}];jt.map(e=>e.key);function tg({companyNameSticky:e,sortConfig:n,onColumnSortConfigChanged:r}){const i=t.useWindowSizeContext(),[a,d]=u.useState(o.cloneDeep(jt));u.useEffect(()=>{const c=[...a];for(const p of c)p.key===n.sortKey?p.sortOrder=n.sortOrder:p.sortOrder="ascending";d(c)},[n.sortKey,n.sortOrder]);const l=(c,p)=>{let m=p;n.sortKey===c&&(m=p==="ascending"?"descending":"ascending"),r(c,m)};return o.jsxRuntimeExports.jsx(ng,{height:Ft,children:a.map(c=>o.jsxRuntimeExports.jsxs(sg,{companyNameSticky:e&&c.key==="companyName",sortDataValue:n.sortKey,actualDataValue:c.key,wrapperWidth:c.width,windowSize:i,children:[o.jsxRuntimeExports.jsxs(lg,{onClick:()=>l(ee.toSubscriptionSortKeyType(c.key),c.sortOrder),children:[o.jsxRuntimeExports.jsx(t.ExtraSmallRegular,{children:c.value}),o.jsxRuntimeExports.jsx(ig,{sortDataValue:n.sortKey,headerdata:c,children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:12,height:12})})]}),o.jsxRuntimeExports.jsx(ag,{windowSize:i,sortDataValue:n.sortKey,isVisible:n.sortKey===c.key&&c.key!=="status",children:o.jsxRuntimeExports.jsx(rg,{onClick:()=>l("status","ascending")})})]},c.key))})}const og=u.memo(tg),ng=s(t.SmallRegular)`
|
|
1962
1964
|
top: 0;
|
|
1963
1965
|
left: 0;
|
|
1964
1966
|
min-height: ${e=>e.height}px;
|
|
@@ -2037,7 +2039,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2037
2039
|
display: inline-block;
|
|
2038
2040
|
}
|
|
2039
2041
|
}
|
|
2040
|
-
`,cn={listItemHeightWithoutPadding:t.sp[10],listItemPadding:34,planAndAddonItemHeight:18},Qi=e=>({height:e.subscriptions.reduce((i,a)=>i+(a.addOns?.length??0),0)*cn.planAndAddonItemHeight+cn.listItemPadding,collapsedHeight:Ae}),Ji=e=>({height:e.subscriptions.reduce((i,a)=>i+(a.plan!=null?1:0),0)*cn.planAndAddonItemHeight+cn.listItemPadding,collapsedHeight:Ae}),mg=e=>{const n=Qi(e),r=Ji(e);return n.height>r.height?n:r},fr=(e,n)=>{switch(n){case"plans":{const r=Ji(e);return r.height>r.collapsedHeight}case"addons":{const r=Qi(e);return r.height>r.collapsedHeight}}},xg=t.appLocale.getLocalizedStrings(),{cockpit:{management:{placeholder:hg}},common:{strings:co,due:gg}}=xg,Sg=({companyView:e,allUsers:n,rowIndex:r,companyNameSticky:i,isCollapsed:a,totalHeight:d,addThreadRequestThreadId:l,targetElementFromNavigation:c,resetTargetElementFromNavigation:p,setNoteData:m,setElementRef:x,setAddThreadRequestThreadId:g,onCollapseToggled:h,onCompanyNameClicked:C,onPassportIconClicked:b,onPlanOrAddOnClicked:S,changeHandlers:y})=>{const[j,f]=u.useState(null),E=t.useWindowSizeContext(),$=e.primarySubscription?.subscription,A=e.primarySubscription?.summary,I=e.primarySubscription?.summary.summary.tenantId,{companyId:v,name:w}=e.company.company.companyInfo,F=fg(A?.schema?.recommendedAction??[]),D=Cg(e,n),K=`cockpit_${v}`,M="subscription.notes",{threads:G,isLoading:q}=t.useFilteredThreads({entityType:M,companyId:v},!1),{openThread:R,threads:L,addThread:W,removeThread:k,setOpenThread:P}=u.useContext(t.ThreadsContext),N=R!==null?L.get(R):null,Q=R?.includes(v)===!0,ae=R!=null&&L.get(R)==null&&Q,z=l!=null&&L.get(l)?.metadata.companyId===v,Y={name:e.company.company.companyInfo.name,status:$?.subscription?.subscription?.status??{code:"",name:""},slabUpperLimit:$?.plan?.plan?.slabUpperLimit??{},slabLowerLimit:$?.plan?.plan?.slabLowerLimit??{},avg2MonthExpenses:A?.summary?.avg2MonthExpenses??{},totalDues:A?.summary?.totalDues??{},recommendedActionName:F[A?.summary?.recommendedActionCode??""]??"",recommendedActionCode:A?.summary?.recommendedActionCode??"",monthlyRecurringRevenue:A?.summary?.monthlyRecurringRevenue??{},...yg(e.subscriptions)},T=o.useForm({mode:"all"}),te="companyData",re=(V,ee)=>`${V}.${ee}`,Z=(V,ee)=>{V===`${te}.controller`&&v!=null&&(ee.users=jg(ee,V).users,y(v,ee))};u.useEffect(()=>{const V=T.watch((ee,{name:ge})=>{ge!=null&&ee.companyData!=null&&o.defer(()=>Z(ge,ee.companyData))});return()=>{V.unsubscribe()}});const ie=u.useCallback(()=>{R?.includes(t.NEW_THREAD_SUFFIX)===!0&&k(R),l!=null&&g(void 0)},[l,R,k,g]),ne=V=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:V.isElementThreadOpen??!1,isElementThreadPresent:V.isElementThreadPresent??!1,itemKey:V.itemKey,elementThreadId:V.elementThreadId??"",roomId:K,addThreadRequestThreadId:l,openThreadId:R,threadStyle:V.threadStyle,openThreadMetadata:N?.metadata??null,onElementClick:ye,onAddThreadClick:$e,targetElement:c??j}),xe=u.useCallback(V=>{if(V===R)P(null);else if(L.has(V))P(V);else if(V.includes(t.NEW_THREAD_SUFFIX)){const[ee,ge]=V.replace(t.NEW_THREAD_SUFFIX,"").split("."),ve=_t(Rt(ee),J.toSubscriptionSortKeyType(ge),v,w);W(V,{type:"thread",visibility:"public",id:V,roomId:K,createdAt:new Date,updatedAt:new Date,comments:[],metadata:ve,resolved:!1}),P(V)}},[v,w,R,L,W,P,K]),ye=u.useCallback((V,ee,ge=!1)=>{const ve=jt.find(Ce=>Ce.key===ee);if(p(),ve!=null&&(V.type==="contextmenu"||ge===!0)){if(ve.isThreadAllowed===!1)return;ie(),V.preventDefault(),V.stopPropagation();const Ce=t.toCollaborationEntityType({tab:"subscription",key:ve.key});if(V.target instanceof HTMLElement||V.target instanceof SVGElement)if(ge===!0&&V.target instanceof HTMLElement)f(V.target.parentElement);else if(V.target instanceof HTMLElement){const B=fs(V.target,oe);f(B||V.target)}else{const B=V.target.closest(`.${oe}`);B instanceof HTMLElement&&f(B)}const O=[...t.getFilteredThreads(L,{entityType:Ce,companyId:v},"both")],ke=O.length>0&&O[0].length>0?O[0][0]:Pe("subscription",ve.key,v);L.has(ke)?xe(ke):l===ke?g(void 0):(g(ke),P(null))}},[L,v,l,xe,g,P,p,ie]),$e=u.useCallback((V,ee)=>{V.stopPropagation();const ge=Pe("subscription",ee,v);g(void 0),xe(ge)},[v,g,xe]);return o.jsxRuntimeExports.jsx(o.FormProvider,{...T,children:o.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{p(),l!=null&&(g(void 0),l.includes(t.NEW_THREAD_SUFFIX)&&k(l))},children:o.jsxRuntimeExports.jsx(Eg,{windowSize:E,isThreadOpen:Q||z,totalHeight:d,isCreationInProgress:ae,children:jt.map((V,ee)=>{const ge=t.toCollaborationEntityType({tab:"subscription",key:V.key}),ve=jt.length-2<=ee,Ce=[...t.getFilteredThreads(L,{entityType:ge,companyId:v},"both")],O=Ce.length>0&&Ce[0].length>0?Ce[0][0]:Pe("subscription",V.key,v),ke=L.get(O),B=ke!=null&&ke.resolved===!1,de=O===R,je=l===O;switch(V.key){case"companyName":return o.jsxRuntimeExports.jsxs(vg,{companyNameSticky:i,columnWidth:V.width,windowSize:E,isThreadOpen:de||je,isThreadAllowed:V.isThreadAllowed,className:oe,onContextMenu:U=>ye(U,V.key),ref:U=>{x(v,V.key,U)},children:[o.jsxRuntimeExports.jsxs(Rg,{children:[o.jsxRuntimeExports.jsx($g,{onClick:U=>{U.preventDefault(),C(e)},children:Y.name}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:de,targetElement:c??j,roomId:K,openThreadId:R,openThreadMetadata:N?.metadata??null})]}),o.jsxRuntimeExports.jsxs(wg,{children:[o.jsxRuntimeExports.jsxs(Pg,{onClick:U=>{U.preventDefault(),m({roomId:K,companyId:v,companyName:w,entityType:M})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:G.length,isLoading:q}),o.jsxRuntimeExports.jsx(Lg,{})]}),o.jsxRuntimeExports.jsx(kg,{onClick:U=>{U.preventDefault(),b(e)},children:o.jsxRuntimeExports.jsx(Tg,{className:"passportIcon"})})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:B,itemKey:V.key,style:{left:t.Space.sp4},onElementClick:ye}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Pe("subscription",V.key,v),addThreadRequestThreadId:l,itemKey:V.key,onAddThreadClick:$e})]},O);case"status":return o.jsxRuntimeExports.jsxs(ut,{ref:U=>{x(v,V.key,U)},columnWidth:V.width,windowSize:E,isThreadOpen:Q||je,isThreadAllowed:V.isThreadAllowed,className:oe,onContextMenu:U=>ye(U,V.key),children:[Y.status.code?o.jsxRuntimeExports.jsx(Rr,{textColor:t.getCockpitColor(Y.status.code),children:Y.status.name.toUpperCase()}):co.hyphen,ne({isElementThreadOpen:de,isElementThreadPresent:B,itemKey:V.key,elementThreadId:O,threadStyle:ve?{right:t.Space.sp0}:void 0})]},O);case"controller":return o.jsxRuntimeExports.jsxs(ut,{ref:U=>{x(v,V.key,U)},columnWidth:V.width,windowSize:E,isThreadOpen:Q||je,isThreadAllowed:V.isThreadAllowed,className:oe,onContextMenu:U=>ye(U,V.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:re(te,"controller"),value:D.controller,placeholderLabel:hg.controller,pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),ne({isElementThreadOpen:de,isElementThreadPresent:B,itemKey:V.key,elementThreadId:O,threadStyle:ve?{right:t.Space.sp0}:void 0})]},O);case"plans":return o.jsxRuntimeExports.jsxs(ut,{ref:U=>{x(v,V.key,U)},columnWidth:V.width,windowSize:E,isThreadOpen:Q||je,isThreadAllowed:V.isThreadAllowed,className:oe,onContextMenu:U=>ye(U,V.key),children:[o.jsxRuntimeExports.jsx(br,{children:Y.plansWithStatus.length>0?o.jsxRuntimeExports.jsx(yr,{plansAndAddonNames:Y.plansWithStatus,isCollapsed:a,rowIndex:r,onCollapseToggled:h,showCollapseToggle:fr(e,"plans"),companyId:v,tenantId:I,onPlanOrAddOnClicked:S}):co.hyphen}),ne({isElementThreadOpen:de,isElementThreadPresent:B,itemKey:V.key,elementThreadId:O,threadStyle:ve?{right:t.Space.sp0}:void 0})]},O);case"planLowerLimit":return o.jsxRuntimeExports.jsxs(ut,{ref:U=>{x(v,V.key,U)},columnWidth:V.width,windowSize:E,isThreadOpen:Q||je,isThreadAllowed:V.isThreadAllowed,className:oe,onContextMenu:U=>ye(U,V.key),children:[o.jsxRuntimeExports.jsx(Tn,{widthWrapper:V.width,windowSize:E,textColor:t.getCockpitColor("lowerLimit"),children:t.amountToString("0,0",Y.slabLowerLimit)}),ne({isElementThreadOpen:de,isElementThreadPresent:B,itemKey:V.key,elementThreadId:O,threadStyle:ve?{right:t.Space.sp0}:void 0})]},O);case"planHigherLimit":return o.jsxRuntimeExports.jsxs(ut,{ref:U=>{x(v,V.key,U)},columnWidth:V.width,windowSize:E,isThreadOpen:Q||je,isThreadAllowed:V.isThreadAllowed,className:oe,onContextMenu:U=>ye(U,V.key),children:[o.jsxRuntimeExports.jsx(Tn,{widthWrapper:V.width,windowSize:E,textColor:t.getCockpitColor("upperLimit"),children:t.amountToString("0,0",Y.slabUpperLimit)}),ne({isElementThreadOpen:de,isElementThreadPresent:B,itemKey:V.key,elementThreadId:O,threadStyle:ve?{right:t.Space.sp0}:void 0})]},O);case"avg2MonthExpenses":return o.jsxRuntimeExports.jsxs(ut,{ref:U=>{x(v,V.key,U)},columnWidth:V.width,windowSize:E,isThreadOpen:Q||je,isThreadAllowed:V.isThreadAllowed,className:oe,onContextMenu:U=>ye(U,V.key),children:[o.jsxRuntimeExports.jsx(Tn,{widthWrapper:V.width,windowSize:E,textColor:t.getCockpitColor("avg2MonthExpenses"),children:t.amountToString("0,0",Y.avg2MonthExpenses)}),ne({isElementThreadOpen:de,isElementThreadPresent:B,itemKey:V.key,elementThreadId:O,threadStyle:ve?{right:t.Space.sp0}:void 0})]},O);case"addons":return o.jsxRuntimeExports.jsxs(ut,{ref:U=>{x(v,V.key,U)},columnWidth:V.width,windowSize:E,isThreadOpen:Q||je,isThreadAllowed:V.isThreadAllowed,className:oe,onContextMenu:U=>ye(U,V.key),children:[o.jsxRuntimeExports.jsx(br,{children:Y.addonsWithStatus.length>0?o.jsxRuntimeExports.jsx(yr,{plansAndAddonNames:Y.addonsWithStatus,isCollapsed:a,rowIndex:r,onCollapseToggled:h,showCollapseToggle:fr(e,"addons"),companyId:v,tenantId:I,onPlanOrAddOnClicked:S}):co.hyphen}),ne({isElementThreadOpen:de,isElementThreadPresent:B,itemKey:V.key,elementThreadId:O,threadStyle:ve?{right:t.Space.sp0}:void 0})]},O);case"upgradeStatus":return o.jsxRuntimeExports.jsxs(ut,{ref:U=>{x(v,V.key,U)},columnWidth:V.width,windowSize:E,isThreadOpen:Q||je,isThreadAllowed:V.isThreadAllowed,className:oe,onContextMenu:U=>ye(U,V.key),children:[o.jsxRuntimeExports.jsx(jr,{children:Y.recommendedActionName?o.jsxRuntimeExports.jsx(Rr,{textColor:t.getCockpitColor(Y.recommendedActionCode),onClick:U=>{U.preventDefault(),I!=null&&Y.recommendedActionCode==="upgrade"&&S(v,I)},code:Y.recommendedActionCode,children:Y.recommendedActionName}):co.hyphen}),ne({isElementThreadOpen:de,isElementThreadPresent:B,itemKey:V.key,elementThreadId:O,threadStyle:ve?{right:t.Space.sp0}:void 0})]},O);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(ut,{ref:U=>{x(v,V.key,U)},columnWidth:V.width,windowSize:E,isThreadOpen:Q||je,isThreadAllowed:V.isThreadAllowed,className:oe,onContextMenu:U=>ye(U,V.key),children:[o.jsxRuntimeExports.jsxs(jr,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:t.amountToString("0,0",Y.monthlyRecurringRevenue)}),Y.totalDues.amount>0?o.jsxRuntimeExports.jsx(Ig,{children:t.amountToString("0,0",Y.totalDues).concat(co.space).concat(gg)}):null]}),ne({isElementThreadOpen:de,isElementThreadPresent:B,itemKey:V.key,elementThreadId:O,threadStyle:ve?{right:t.Space.sp0}:void 0})]},O);default:return null}})})})})})},yg=e=>{const n={plansWithStatus:[],addonsWithStatus:[]};return e.forEach(r=>{const i=r.plan?.plan.name??"",a=r.subscription.subscription.status.code;i!=null&&n.plansWithStatus.push({name:i,status:a}),r.addOns.forEach(d=>{n.addonsWithStatus.push({name:d.addOn.name,status:a})})}),n},fg=e=>{const n={};return e.reduce((i,a)=>(i[a.code]=a.name,i),n)};function Cg(e,n){return{controller:{allUsers:n,selectedUsers:e.controllers.map(r=>r.user)}}}function jg(e,n){const r={};r.users=[];const i=n.split(".")[1],{selectedUsers:a,deSelectedUsers:d}=e[i];return d==null||d?.length==0?a.forEach(l=>{if(l.isUserSelectionUpdated===!0){const c=Cr(i,l.userId,l.isRoleSelected);c!==void 0&&r.users?.push(c)}}):d.forEach(l=>{const c=Cr(i,l.userId,l.isRoleSelected);c!==void 0&&r.users?.push(c)}),{users:r.users}}function bg(e){return e==="controller"}function Cr(e,n,r){if(bg(e))return{isZeni:!0,role:e,userId:n,isSelected:r}}const Rg=s.div``,$g=s(t.LargeMediumSp)`
|
|
2042
|
+
`,cn={listItemHeightWithoutPadding:t.sp[10],listItemPadding:34,planAndAddonItemHeight:18},Qi=e=>({height:e.subscriptions.reduce((i,a)=>i+(a.addOns?.length??0),0)*cn.planAndAddonItemHeight+cn.listItemPadding,collapsedHeight:Le}),Ji=e=>({height:e.subscriptions.reduce((i,a)=>i+(a.plan!=null?1:0),0)*cn.planAndAddonItemHeight+cn.listItemPadding,collapsedHeight:Le}),mg=e=>{const n=Qi(e),r=Ji(e);return n.height>r.height?n:r},fr=(e,n)=>{switch(n){case"plans":{const r=Ji(e);return r.height>r.collapsedHeight}case"addons":{const r=Qi(e);return r.height>r.collapsedHeight}}},xg=t.appLocale.getLocalizedStrings(),{cockpit:{management:{placeholder:hg}},common:{strings:co,due:gg}}=xg,Sg=({companyView:e,allUsers:n,rowIndex:r,companyNameSticky:i,isCollapsed:a,totalHeight:d,addThreadRequestThreadId:l,targetElementFromNavigation:c,resetTargetElementFromNavigation:p,setNoteData:m,setElementRef:x,setAddThreadRequestThreadId:g,onCollapseToggled:h,onCompanyNameClicked:C,onPassportIconClicked:b,onPlanOrAddOnClicked:S,changeHandlers:y})=>{const[j,f]=u.useState(null),E=t.useWindowSizeContext(),$=e.primarySubscription?.subscription,A=e.primarySubscription?.summary,I=e.primarySubscription?.summary.summary.tenantId,{companyId:w,name:k}=e.company.company.companyInfo,N=fg(A?.schema?.recommendedAction??[]),D=Cg(e,n),G=`cockpit_${w}`,O="subscription.notes",{threads:Z,isLoading:q}=t.useFilteredThreads({entityType:O,companyId:w},!1),{openThread:R,threads:T,addThread:V,removeThread:W,setOpenThread:v}=u.useContext(t.ThreadsContext),L=R!==null?T.get(R):null,J=R?.includes(w)===!0,re=R!=null&&T.get(R)==null&&J,F=l!=null&&T.get(l)?.metadata.companyId===w,K={name:e.company.company.companyInfo.name,status:$?.subscription?.subscription?.status??{code:"",name:""},slabUpperLimit:$?.plan?.plan?.slabUpperLimit??{},slabLowerLimit:$?.plan?.plan?.slabLowerLimit??{},avg2MonthExpenses:A?.summary?.avg2MonthExpenses??{},totalDues:A?.summary?.totalDues??{},recommendedActionName:N[A?.summary?.recommendedActionCode??""]??"",recommendedActionCode:A?.summary?.recommendedActionCode??"",monthlyRecurringRevenue:A?.summary?.monthlyRecurringRevenue??{},...yg(e.subscriptions)},H=o.useForm({mode:"all"}),_="companyData",oe=(B,Se)=>`${B}.${Se}`,ne=(B,Se)=>{B===`${_}.controller`&&w!=null&&(Se.users=jg(Se,B).users,y(w,Se))};u.useEffect(()=>{const B=H.watch((Se,{name:ie})=>{ie!=null&&Se.companyData!=null&&o.defer(()=>ne(ie,Se.companyData))});return()=>{B.unsubscribe()}});const Y=u.useCallback(()=>{R?.includes(t.NEW_THREAD_SUFFIX)===!0&&W(R),l!=null&&g(void 0)},[l,R,W,g]),le=B=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:B.isElementThreadOpen??!1,isElementThreadPresent:B.isElementThreadPresent??!1,itemKey:B.itemKey,elementThreadId:B.elementThreadId??"",roomId:G,addThreadRequestThreadId:l,openThreadId:R,threadStyle:B.threadStyle,openThreadMetadata:L?.metadata??null,onElementClick:fe,onAddThreadClick:we,targetElement:c??j}),ce=u.useCallback(B=>{if(B===R)v(null);else if(T.has(B))v(B);else if(B.includes(t.NEW_THREAD_SUFFIX)){const[Se,ie]=B.replace(t.NEW_THREAD_SUFFIX,"").split("."),ye=_t(Rt(Se),ee.toSubscriptionSortKeyType(ie),w,k);V(B,{type:"thread",visibility:"public",id:B,roomId:G,createdAt:new Date,updatedAt:new Date,comments:[],metadata:ye,resolved:!1}),v(B)}},[w,k,R,T,V,v,G]),fe=u.useCallback((B,Se,ie=!1)=>{const ye=jt.find(Ie=>Ie.key===Se);if(p(),ye!=null&&(B.type==="contextmenu"||ie===!0)){if(ye.isThreadAllowed===!1)return;Y(),B.preventDefault(),B.stopPropagation();const Ie=t.toCollaborationEntityType({tab:"subscription",key:ye.key});if(B.target instanceof HTMLElement||B.target instanceof SVGElement)if(ie===!0&&B.target instanceof HTMLElement)f(B.target.parentElement);else if(B.target instanceof HTMLElement){const z=fs(B.target,te);f(z||B.target)}else{const z=B.target.closest(`.${te}`);z instanceof HTMLElement&&f(z)}const xe=[...t.getFilteredThreads(T,{entityType:Ie,companyId:w},"both")],M=xe.length>0&&xe[0].length>0?xe[0][0]:Pe("subscription",ye.key,w);T.has(M)?ce(M):l===M?g(void 0):(g(M),v(null))}},[T,w,l,ce,g,v,p,Y]),we=u.useCallback((B,Se)=>{B.stopPropagation();const ie=Pe("subscription",Se,w);g(void 0),ce(ie)},[w,g,ce]);return o.jsxRuntimeExports.jsx(o.FormProvider,{...H,children:o.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{p(),l!=null&&(g(void 0),l.includes(t.NEW_THREAD_SUFFIX)&&W(l))},children:o.jsxRuntimeExports.jsx(Eg,{windowSize:E,isThreadOpen:J||F,totalHeight:d,isCreationInProgress:re,children:jt.map((B,Se)=>{const ie=t.toCollaborationEntityType({tab:"subscription",key:B.key}),ye=jt.length-2<=Se,Ie=[...t.getFilteredThreads(T,{entityType:ie,companyId:w},"both")],xe=Ie.length>0&&Ie[0].length>0?Ie[0][0]:Pe("subscription",B.key,w),M=T.get(xe),z=M!=null&&M.resolved===!1,Ce=xe===R,ue=l===xe;switch(B.key){case"companyName":return o.jsxRuntimeExports.jsxs(vg,{companyNameSticky:i,columnWidth:B.width,windowSize:E,isThreadOpen:Ce||ue,isThreadAllowed:B.isThreadAllowed,className:te,onContextMenu:Q=>fe(Q,B.key),ref:Q=>{x(w,B.key,Q)},children:[o.jsxRuntimeExports.jsxs(Rg,{children:[o.jsxRuntimeExports.jsx($g,{onClick:Q=>{Q.preventDefault(),C(e)},children:K.name}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:Ce,targetElement:c??j,roomId:G,openThreadId:R,openThreadMetadata:L?.metadata??null})]}),o.jsxRuntimeExports.jsxs(wg,{children:[o.jsxRuntimeExports.jsxs(Pg,{onClick:Q=>{Q.preventDefault(),m({roomId:G,companyId:w,companyName:k,entityType:O})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:Z.length,isLoading:q}),o.jsxRuntimeExports.jsx(Lg,{})]}),o.jsxRuntimeExports.jsx(kg,{onClick:Q=>{Q.preventDefault(),b(e)},children:o.jsxRuntimeExports.jsx(Tg,{className:"passportIcon"})})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:z,itemKey:B.key,style:{left:t.Space.sp4},onElementClick:fe}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Pe("subscription",B.key,w),addThreadRequestThreadId:l,itemKey:B.key,onAddThreadClick:we})]},xe);case"status":return o.jsxRuntimeExports.jsxs(ut,{ref:Q=>{x(w,B.key,Q)},columnWidth:B.width,windowSize:E,isThreadOpen:J||ue,isThreadAllowed:B.isThreadAllowed,className:te,onContextMenu:Q=>fe(Q,B.key),children:[K.status.code?o.jsxRuntimeExports.jsx(Rr,{textColor:t.getCockpitColor(K.status.code),children:K.status.name.toUpperCase()}):co.hyphen,le({isElementThreadOpen:Ce,isElementThreadPresent:z,itemKey:B.key,elementThreadId:xe,threadStyle:ye?{right:t.Space.sp0}:void 0})]},xe);case"controller":return o.jsxRuntimeExports.jsxs(ut,{ref:Q=>{x(w,B.key,Q)},columnWidth:B.width,windowSize:E,isThreadOpen:J||ue,isThreadAllowed:B.isThreadAllowed,className:te,onContextMenu:Q=>fe(Q,B.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:oe(_,"controller"),value:D.controller,placeholderLabel:hg.controller,pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),le({isElementThreadOpen:Ce,isElementThreadPresent:z,itemKey:B.key,elementThreadId:xe,threadStyle:ye?{right:t.Space.sp0}:void 0})]},xe);case"plans":return o.jsxRuntimeExports.jsxs(ut,{ref:Q=>{x(w,B.key,Q)},columnWidth:B.width,windowSize:E,isThreadOpen:J||ue,isThreadAllowed:B.isThreadAllowed,className:te,onContextMenu:Q=>fe(Q,B.key),children:[o.jsxRuntimeExports.jsx(br,{children:K.plansWithStatus.length>0?o.jsxRuntimeExports.jsx(yr,{plansAndAddonNames:K.plansWithStatus,isCollapsed:a,rowIndex:r,onCollapseToggled:h,showCollapseToggle:fr(e,"plans"),companyId:w,tenantId:I,onPlanOrAddOnClicked:S}):co.hyphen}),le({isElementThreadOpen:Ce,isElementThreadPresent:z,itemKey:B.key,elementThreadId:xe,threadStyle:ye?{right:t.Space.sp0}:void 0})]},xe);case"planLowerLimit":return o.jsxRuntimeExports.jsxs(ut,{ref:Q=>{x(w,B.key,Q)},columnWidth:B.width,windowSize:E,isThreadOpen:J||ue,isThreadAllowed:B.isThreadAllowed,className:te,onContextMenu:Q=>fe(Q,B.key),children:[o.jsxRuntimeExports.jsx(Tn,{widthWrapper:B.width,windowSize:E,textColor:t.getCockpitColor("lowerLimit"),children:t.amountToString("0,0",K.slabLowerLimit)}),le({isElementThreadOpen:Ce,isElementThreadPresent:z,itemKey:B.key,elementThreadId:xe,threadStyle:ye?{right:t.Space.sp0}:void 0})]},xe);case"planHigherLimit":return o.jsxRuntimeExports.jsxs(ut,{ref:Q=>{x(w,B.key,Q)},columnWidth:B.width,windowSize:E,isThreadOpen:J||ue,isThreadAllowed:B.isThreadAllowed,className:te,onContextMenu:Q=>fe(Q,B.key),children:[o.jsxRuntimeExports.jsx(Tn,{widthWrapper:B.width,windowSize:E,textColor:t.getCockpitColor("upperLimit"),children:t.amountToString("0,0",K.slabUpperLimit)}),le({isElementThreadOpen:Ce,isElementThreadPresent:z,itemKey:B.key,elementThreadId:xe,threadStyle:ye?{right:t.Space.sp0}:void 0})]},xe);case"avg2MonthExpenses":return o.jsxRuntimeExports.jsxs(ut,{ref:Q=>{x(w,B.key,Q)},columnWidth:B.width,windowSize:E,isThreadOpen:J||ue,isThreadAllowed:B.isThreadAllowed,className:te,onContextMenu:Q=>fe(Q,B.key),children:[o.jsxRuntimeExports.jsx(Tn,{widthWrapper:B.width,windowSize:E,textColor:t.getCockpitColor("avg2MonthExpenses"),children:t.amountToString("0,0",K.avg2MonthExpenses)}),le({isElementThreadOpen:Ce,isElementThreadPresent:z,itemKey:B.key,elementThreadId:xe,threadStyle:ye?{right:t.Space.sp0}:void 0})]},xe);case"addons":return o.jsxRuntimeExports.jsxs(ut,{ref:Q=>{x(w,B.key,Q)},columnWidth:B.width,windowSize:E,isThreadOpen:J||ue,isThreadAllowed:B.isThreadAllowed,className:te,onContextMenu:Q=>fe(Q,B.key),children:[o.jsxRuntimeExports.jsx(br,{children:K.addonsWithStatus.length>0?o.jsxRuntimeExports.jsx(yr,{plansAndAddonNames:K.addonsWithStatus,isCollapsed:a,rowIndex:r,onCollapseToggled:h,showCollapseToggle:fr(e,"addons"),companyId:w,tenantId:I,onPlanOrAddOnClicked:S}):co.hyphen}),le({isElementThreadOpen:Ce,isElementThreadPresent:z,itemKey:B.key,elementThreadId:xe,threadStyle:ye?{right:t.Space.sp0}:void 0})]},xe);case"upgradeStatus":return o.jsxRuntimeExports.jsxs(ut,{ref:Q=>{x(w,B.key,Q)},columnWidth:B.width,windowSize:E,isThreadOpen:J||ue,isThreadAllowed:B.isThreadAllowed,className:te,onContextMenu:Q=>fe(Q,B.key),children:[o.jsxRuntimeExports.jsx(jr,{children:K.recommendedActionName?o.jsxRuntimeExports.jsx(Rr,{textColor:t.getCockpitColor(K.recommendedActionCode),onClick:Q=>{Q.preventDefault(),I!=null&&K.recommendedActionCode==="upgrade"&&S(w,I)},code:K.recommendedActionCode,children:K.recommendedActionName}):co.hyphen}),le({isElementThreadOpen:Ce,isElementThreadPresent:z,itemKey:B.key,elementThreadId:xe,threadStyle:ye?{right:t.Space.sp0}:void 0})]},xe);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(ut,{ref:Q=>{x(w,B.key,Q)},columnWidth:B.width,windowSize:E,isThreadOpen:J||ue,isThreadAllowed:B.isThreadAllowed,className:te,onContextMenu:Q=>fe(Q,B.key),children:[o.jsxRuntimeExports.jsxs(jr,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:t.amountToString("0,0",K.monthlyRecurringRevenue)}),K.totalDues.amount>0?o.jsxRuntimeExports.jsx(Ig,{children:t.amountToString("0,0",K.totalDues).concat(co.space).concat(gg)}):null]}),le({isElementThreadOpen:Ce,isElementThreadPresent:z,itemKey:B.key,elementThreadId:xe,threadStyle:ye?{right:t.Space.sp0}:void 0})]},xe);default:return null}})})})})})},yg=e=>{const n={plansWithStatus:[],addonsWithStatus:[]};return e.forEach(r=>{const i=r.plan?.plan.name??"",a=r.subscription.subscription.status.code;i!=null&&n.plansWithStatus.push({name:i,status:a}),r.addOns.forEach(d=>{n.addonsWithStatus.push({name:d.addOn.name,status:a})})}),n},fg=e=>{const n={};return e.reduce((i,a)=>(i[a.code]=a.name,i),n)};function Cg(e,n){return{controller:{allUsers:n,selectedUsers:e.controllers.map(r=>r.user)}}}function jg(e,n){const r={};r.users=[];const i=n.split(".")[1],{selectedUsers:a,deSelectedUsers:d}=e[i];return d==null||d?.length==0?a.forEach(l=>{if(l.isUserSelectionUpdated===!0){const c=Cr(i,l.userId,l.isRoleSelected);c!==void 0&&r.users?.push(c)}}):d.forEach(l=>{const c=Cr(i,l.userId,l.isRoleSelected);c!==void 0&&r.users?.push(c)}),{users:r.users}}function bg(e){return e==="controller"}function Cr(e,n,r){if(bg(e))return{isZeni:!0,role:e,userId:n,isSelected:r}}const Rg=s.div``,$g=s(t.LargeMediumSp)`
|
|
2041
2043
|
word-break: break-word;
|
|
2042
2044
|
margin-right: 10px;
|
|
2043
2045
|
cursor: pointer;
|
|
@@ -2055,7 +2057,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2055
2057
|
color: ${e=>e.theme.colors.hero};
|
|
2056
2058
|
box-shadow: ${e=>`${t.Space.sp0} 2px ${t.Space.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
2057
2059
|
|
|
2058
|
-
${e=>e.isThreadOpen?
|
|
2060
|
+
${e=>e.isThreadOpen?ve.css`
|
|
2059
2061
|
box-shadow: ${t.Space.sp0} 2px ${t.Space.sp2}
|
|
2060
2062
|
${e.theme.colors.dropShadowHover};
|
|
2061
2063
|
border: 1px solid ${e.theme.colors.primary};
|
|
@@ -2075,7 +2077,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2075
2077
|
border-color: ${e=>e.theme.colors.primary};
|
|
2076
2078
|
}
|
|
2077
2079
|
}
|
|
2078
|
-
${e=>e.isCreationInProgress?
|
|
2080
|
+
${e=>e.isCreationInProgress?ve.css`
|
|
2079
2081
|
border: 1px solid ${e.theme.colors.primary};
|
|
2080
2082
|
animation: animate 3s linear infinite;
|
|
2081
2083
|
`:null};
|
|
@@ -2210,7 +2212,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2210
2212
|
`,In=s.div`
|
|
2211
2213
|
width: ${e=>e.width.valuePx(e.windowSize)};
|
|
2212
2214
|
color: ${e=>e.textColor.color.toString()};
|
|
2213
|
-
`,Mg={subscriptionRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},{common:{headers:{comments:zg}},collaboration:{threads:{placeholder:{addANewComment:Fg,replyAComment:Bg},tooltip:{resolveComment:Wg,unResolveComment:_g}}}}=t.appLocale.getLocalizedStrings(),Vg=({subscriptionView:e,onColumnSortConfigChanged:n,onCollapseToggled:r,onCompanyNameClicked:i,onPassportIconClicked:a,onPlanOrAddOnClicked:d,onScroll:l,changeHandlers:c,initialOpenThreadRequest:p})=>{const m=t.useWindowSizeContext(),x=u.useRef(null),[g,h]=u.useState(null),C=u.useRef(null),[b,S]=u.useState(null),y=!(m==="small"||m==="medium-compact");u.useEffect(()=>{x.current&&x.current.resetAfterIndex(0)},[e.uiState.isCollapsedByCompanyId,e.uiState.sortKey,e.uiState.sortOrder,e.companies.length]);const{uiState:j,totalMonthlyRecurringRevenue:f}=e,E=j.scrollYOffset??0,$=u.useCallback(
|
|
2215
|
+
`,Mg={subscriptionRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},{common:{headers:{comments:zg}},collaboration:{threads:{placeholder:{addANewComment:Fg,replyAComment:Bg},tooltip:{resolveComment:Wg,unResolveComment:_g}}}}=t.appLocale.getLocalizedStrings(),Vg=({subscriptionView:e,onColumnSortConfigChanged:n,onCollapseToggled:r,onCompanyNameClicked:i,onPassportIconClicked:a,onPlanOrAddOnClicked:d,onScroll:l,changeHandlers:c,initialOpenThreadRequest:p})=>{const m=t.useWindowSizeContext(),x=u.useRef(null),[g,h]=u.useState(null),C=u.useRef(null),[b,S]=u.useState(null),y=!(m==="small"||m==="medium-compact");u.useEffect(()=>{x.current&&x.current.resetAfterIndex(0)},[e.uiState.isCollapsedByCompanyId,e.uiState.sortKey,e.uiState.sortOrder,e.companies.length]);const{uiState:j,totalMonthlyRecurringRevenue:f}=e,E=j.scrollYOffset??0,$=u.useCallback(T=>{const V=e.companies[T].company.company.companyInfo.companyId;r(V,!e.uiState.isCollapsedByCompanyId[V])},[r,e.companies,e.uiState.isCollapsedByCompanyId]),A=u.useCallback(T=>{const V=e.companies[T].company.company.companyInfo.name.length,W=e.companies[T].company.company.companyInfo.companyId,v=mg(e.companies[T]);return e.uiState.isCollapsedByCompanyId[W]?v.height:V>Wt?Le+32:Le},[e.companies,e.uiState.isCollapsedByCompanyId]),{setOpenThread:I,setRequestToOpenThread:w,requestToOpenThread:k,isLoading:N}=u.useContext(t.ThreadsContext);u.useEffect(()=>{p!=null&&e.fetchState==="Completed"&&N===!1&&w(p)},[p,e.fetchState,N,w]);const[D,G]=u.useState(void 0),O=u.useRef([]),Z=u.useMemo(()=>({makeCompanyNameSticky:y,uiState:j,totalMonthlyRecurringRevenue:f,onColumnSortConfigChanged:n}),[y,j,f,n]),q=u.useCallback((T,V,W)=>{const v=e.companies.findIndex(J=>J.company.company.companyInfo.companyId===T),L=jt.findIndex(J=>J.key===V);v!==-1&&L!==-1&&(O.current[v]==null?O.current[v]=[W]:O.current[v][L]=W)},[e.companies]),R=u.useCallback(()=>{C.current=null,w(null)},[w]);return u.useEffect(()=>{if(k!=null&&g!=null){const{companyId:T,entityType:V}=k,[W,v]=V.split("."),L=e.companies.findIndex(K=>K.company.company.companyInfo.companyId===T),J=jt.findIndex(K=>K.key===v);L!==-1&&!(g.visibleStartIndex<=L&&g.visibleStopIndex>=L)&&x.current?.scrollToItem(L,"center"),setTimeout(()=>{const K=O.current[L]?.[0]?.getBoundingClientRect().bottom,H=O.current[L]?.[0]?.getBoundingClientRect().top;if(K!=null&&H!=null&&(window.innerHeight>=K&&window.innerHeight>=H||H<0)){const _=O.current[L][J];_!=null&&(C.current={companyId:T,target:_}),O.current[L][J]?.scrollIntoView({block:"center",behavior:"auto"})}},0);const F=setInterval(()=>{const K=O.current[L]?.[J]?.getBoundingClientRect().left,H=O.current[L]?.[J]?.getBoundingClientRect().right,_=O.current[L]?.[J]?.offsetWidth;if(C.current?.companyId===T&&K!=null&&_!=null&&H!=null&&(K<window.innerWidth-_||H<window.innerWidth)){clearInterval(F);const oe=k.threadId,ne=k.onThreadShownCallback;oe&&(w(null),I(k.threadId),ne?.())}},500);setTimeout(()=>{clearInterval(F),w(null)},2e3)}},[k,g,I,w]),o.jsxRuntimeExports.jsx(Hg,{children:o.jsxRuntimeExports.jsxs(ea.Provider,{value:Z,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:T,width:V})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:T,innerElementType:ta,itemCount:e.companies.length,itemSize:A,onItemsRendered:W=>h(W),itemData:{subscriptionView:e,makeCompanyNameSticky:y,addThreadRequestThreadId:D,targetElement:C.current?.target,resetTargetElementFromNavigation:R,setElementRef:q,setAddThreadRequestThreadId:G,onCompanyNameClicked:i,onPassportIconClicked:a,changeHandlers:c,setNoteData:S,onCollapseToggledHandler:$,onPlanOrAddOnClicked:d},width:V,overscanCount:Bt,ref:x,onScroll:({scrollOffset:W})=>{l(W)},initialScrollOffset:E,children:Ug})}),b!=null?o.jsxRuntimeExports.jsx(Xe.RoomProvider,{id:b.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${b.companyName} ${zg}`,filter:{application:"cockpit",companyId:b.companyId,entityType:b.entityType,isGlobalComment:!1,tab:"subscription"},isLoading:!1,threadMetadata:{companyName:b.companyName,companyId:b.companyId,entityId:b.companyId,entityType:b.entityType,isGlobalComment:!1,application:"cockpit",tab:"subscription",url:window.location.href},textOverrides:{composerPlaceholder:Fg,replyComposerPlaceholder:Bg,threadResolve:Wg,threadUnResolve:_g},onThreadClick:T=>null,onCloseAllThreadsDrawer:()=>S(null)})}):null]})})},ea=u.createContext(void 0),ta=u.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:d,uiState:l,totalMonthlyRecurringRevenue:c,onColumnSortConfigChanged:p}=u.useContext(ea);return o.jsxRuntimeExports.jsxs(Kg,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(og,{companyNameSticky:d,onColumnSortConfigChanged:p,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),o.jsxRuntimeExports.jsx(Yg,{children:r}),o.jsxRuntimeExports.jsx(Ag,{companyNameSticky:d,totalMRRAmount:t.amountToString("0,0",c)})]})});ta.displayName="Subscription list view inner element type";const Ug=({index:e,data:n,style:r})=>{const i=t.useWindowSizeContext(),{setNoteData:a,subscriptionView:d,makeCompanyNameSticky:l,addThreadRequestThreadId:c,targetElement:p,resetTargetElementFromNavigation:m,setElementRef:x,changeHandlers:g,onCompanyNameClicked:h,onPassportIconClicked:C,onPlanOrAddOnClicked:b,setAddThreadRequestThreadId:S,onCollapseToggledHandler:y}=n,j=d.companies[e],{companyId:f}=j.company.company.companyInfo,E=d.uiState.isCollapsedByCompanyId[f]===!0;return o.jsxRuntimeExports.jsx(Gg,{isCollapsed:E,style:{...r,width:"fit-content",minWidth:"100%",padding:`${t.Space.sp0} ${Mg.subscriptionRightPadding.valuePx(i)} ${t.Space.sp3} ${t.Space.sp0}`},children:o.jsxRuntimeExports.jsx(Sg,{companyView:d.companies[e],allUsers:d.zeniUsers.values,rowIndex:e,companyNameSticky:l,isCollapsed:E,onCollapseToggled:y,onCompanyNameClicked:h,onPassportIconClicked:C,onPlanOrAddOnClicked:b,changeHandlers:g,addThreadRequestThreadId:c,targetElementFromNavigation:p,resetTargetElementFromNavigation:m,setNoteData:a,setElementRef:x,setAddThreadRequestThreadId:S,totalHeight:typeof r.height=="number"?r.height:Le})},f)},Hg=s.div`
|
|
2214
2216
|
/** Subtract top so list can occupy remaining available height */
|
|
2215
2217
|
height: calc(100vh - 110px);
|
|
2216
2218
|
max-width: 99.9%;
|
|
@@ -2263,7 +2265,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2263
2265
|
`,d1=s.div`
|
|
2264
2266
|
display: flex;
|
|
2265
2267
|
flex-direction: column;
|
|
2266
|
-
`,p1=t.appLocale.getLocalizedStrings().common,oa={infoLabel:new t.ResponsiveSizedStyle("smallRegular","standardRegular"),selectFieldInput:new t.ResponsiveSizedStyle("standardRegular","largeRegular")},u1=({name:e,registerOptions:n,defaultValue:r,isDisabled:i,style:a,placeholder:d,valueToInfo:l,valueToId:c,showEmptyState:p,additionalLabelInfo:m,customStyleConfig:x,showDownChevronWithValue:g,customPlaceholderString:h,allowEmpty:C=!0,tooltip:b,menuPortal:S,disableCurrentOption:y})=>{const{control:j,formState:{errors:f,dirtyFields:E}}=o.useFormContext(),$=t.useWindowSizeContext(),A=o.useTheme(),[I,
|
|
2268
|
+
`,p1=t.appLocale.getLocalizedStrings().common,oa={infoLabel:new t.ResponsiveSizedStyle("smallRegular","standardRegular"),selectFieldInput:new t.ResponsiveSizedStyle("standardRegular","largeRegular")},u1=({name:e,registerOptions:n,defaultValue:r,isDisabled:i,style:a,placeholder:d,valueToInfo:l,valueToId:c,showEmptyState:p,additionalLabelInfo:m,customStyleConfig:x,showDownChevronWithValue:g,customPlaceholderString:h,allowEmpty:C=!0,tooltip:b,menuPortal:S,disableCurrentOption:y})=>{const{control:j,formState:{errors:f,dirtyFields:E}}=o.useFormContext(),$=t.useWindowSizeContext(),A=o.useTheme(),[I,w]=u.useState(!1),k=o.has(E,e),N=o.has(f,e??""),D=u.useCallback(R=>({value:R.value,label:R.label,info:l?.(R.value)??"",id:c?.(R.value)??null,isDisabled:R.isDisabled,additionalNote:R?.additionalNote,isOptionRecommended:R.isOptionRecommended}),[l,c]),G=R=>R.map(T=>({label:T.label,options:T.options.map(V=>D(V))})),O=R=>{if(R==null||!R)return;let T=[];return r.allOptions.forEach(V=>{T=T.concat(V.options)}),{value:R,label:T.find(V=>V.value===R)?.label??R,info:l?.(R)??""}};if(p===!0&&I===!1&&k===!1&&!r.selectedOption&&i==null)return o.jsxRuntimeExports.jsx(t.ItemWithButton,{style:a,buttonTitle:p1.add,onClick:()=>w(!0),name:e});const Z={...x,container:R=>({...R,width:"100%",...a}),menu:(R,T)=>({...R,backgroundColor:A.colors.grey5,borderRadius:"6px",whiteSpace:"nowrap",zIndex:2,width:"100%",margin:0,...x?.menu?.(R,T)}),menuList:(R,T)=>({...R,borderRadius:"6px",...x?.menuList?.(R,T)}),group:R=>({...R,borderBottom:`1px solid ${A.colors.grey3}`,paddingBottom:0}),control:(R,T)=>({...R,borderRadius:"6px",...x?.control?.(R,T)})},q={hasError:N,showDownChevronWithValue:g,customPlaceholderString:h};return o.jsxRuntimeExports.jsx(o.Controller,{name:e,control:j,defaultValue:r,rules:n,render:({field:{onChange:R,onBlur:T,value:V,ref:W}})=>{const v=V;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[u.createElement(o.StateManagedSelect$1,{...q,ref:W,isMulti:!1,isSearchable:!0,isClearable:!0,controlShouldRenderValue:!0,placeholder:d,value:O(v.selectedOption),options:G(v.allOptions),onChange:L=>{L==null||L?.value!=null&&v?.selectedOption===L.value?C===!0&&R({selectedOption:void 0,allOptions:v.allOptions}):R({selectedOption:L.value,allOptions:v.allOptions})},key:o.nanoid(),tabSelectsValue:!1,openMenuOnFocus:!0,classNamePrefix:"grouped-single-select-field",onBlur:T,menuPlacement:"auto",menuPortalTarget:S,maxMenuHeight:288,menuShouldScrollIntoView:!0,closeMenuOnSelect:!0,components:{Control:m1,Option:C1,Input:h1,Group:g1,GroupHeading:S1,SingleValue:L=>y1(L,b),ValueContainer:x1,DropdownIndicator:_1,IndicatorSeparator:V1,Placeholder:f1,ClearIndicator:U1},hideSelectedOptions:!1,styles:Z,isDisabled:i!=null,isOptionDisabled:L=>y?.(L.value)??!1}),o.jsxRuntimeExports.jsx(A1,{size:$,children:m})]})}})},m1=e=>{const{menuIsOpen:n,isFocused:r,isDisabled:i,selectProps:a,data:d,options:l}=e,{value:c,hasError:p,customPlaceholderString:m}=a;let x=[];l.forEach(C=>{x=x.concat(C.options)});const g=x.find(C=>C.value===d?.value),h=t.useWindowSizeContext();return o.jsxRuntimeExports.jsx(E1,{title:m!=null&&c!=null?c.label:void 0,windowSize:h,menuIsOpen:n,isFocused:r,isDisabled:i,selectedValue:c,hasError:p,customPlaceholderString:m,isRecommended:g?.isOptionRecommended,children:o.jsxRuntimeExports.jsx(o.components.Control,{...e,className:"select-control",children:e.children})})},x1=e=>{const{selectProps:n,children:r}=e,{showDownChevronWithValue:i}=n;return o.jsxRuntimeExports.jsxs(o.components.ValueContainer,{...e,className:"select-value-container",children:[r,i===!0?o.jsxRuntimeExports.jsx(t.LargeRegular,{children:o.jsxRuntimeExports.jsx(v1,{})}):null]})},h1=e=>{const{selectProps:n,innerRef:r,innerProps:i}=e,{placeholder:a,value:d,customPlaceholderString:l,menuIsOpen:c,onMenuOpen:p,hasError:m}=n;return l!=null&&d==null&&c===!1?o.jsxRuntimeExports.jsx(Y1,{ref:r,...i,onClick:p,style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"flex-start",cursor:"pointer"},className:"custom-placeholder",children:o.jsxRuntimeExports.jsxs(H1,{children:[o.jsxRuntimeExports.jsx(K1,{hasError:m}),o.jsxRuntimeExports.jsx(G1,{hasError:m,children:l})]})}):o.jsxRuntimeExports.jsx(o.components.Input,{...e,autoComplete:"new-password",autoFocus:c,placeholder:d==null?a:void 0,children:e.children})},g1=e=>o.jsxRuntimeExports.jsx(o.components.Group,{...e,children:e.children}),S1=e=>{const[n,r]=u.useState(!0);return o.jsxRuntimeExports.jsx(D1,{className:"group-heading-container",isGroupOpen:n,onClick:()=>r(!n),children:o.jsxRuntimeExports.jsxs(o.components.GroupHeading,{...e,children:[o.jsxRuntimeExports.jsx(O1,{isGroupOpen:n,children:o.jsxRuntimeExports.jsx(N1,{className:"close-tick-icon"})}),e.children]})})},y1=({children:e,...n},r)=>{const i=r==null||n.selectProps.menuIsOpen===!0?e:r.sticky===!0?o.jsxRuntimeExports.jsx(j1,{title:r.text,children:e}):o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:t.Space.sp3},title:r.text,placement:"top",children:e});return o.jsxRuntimeExports.jsx(o.components.SingleValue,{title:e,...n,children:i})},f1=()=>null,C1=e=>{const{data:n,isSelected:r,options:i,isDisabled:a,isFocused:d,selectProps:l}=e,{customPlaceholderString:c}=l;let p=[];i.forEach(x=>{p=p.concat(x.options)});const m=p.find(x=>x.value===n.value);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(w1,{title:c!=null?e.label:void 0,className:"select-option-wrapper",isFocused:d,isSelected:r,isDisabled:a,isOptionRecommended:m?.isOptionRecommended===!0,showBottomBorder:m?.additionalNote==null||m?.isOptionRecommended===!1,children:o.jsxRuntimeExports.jsx(o.components.Option,{...e,className:"select-option",children:o.jsxRuntimeExports.jsxs(k1,{children:[o.jsxRuntimeExports.jsxs(L1,{isSelected:r,children:[o.jsxRuntimeExports.jsx(T1,{isSelected:r,isDisabled:a,children:e.label}),d===!0&&m?.id!=null&&o.jsxRuntimeExports.jsx(W1,{children:m.id}),d===!0&&m?.info?o.jsxRuntimeExports.jsx(I1,{isSelected:!!r,children:m?.info}):null]}),m?.isOptionRecommended===!0?o.jsxRuntimeExports.jsx(B1,{}):null,r&&m?.additionalNote==null?o.jsxRuntimeExports.jsxs(M1,{children:[o.jsxRuntimeExports.jsx(z1,{className:"right-tick-icon"}),o.jsxRuntimeExports.jsx(F1,{className:"close-tick-icon"})]}):null]})})}),m?.isOptionRecommended===!0&&m.additionalNote!=null?o.jsxRuntimeExports.jsx(P1,{isSelected:r,isDisabled:a,children:m?.additionalNote}):null]})},j1=({children:e,title:n})=>o.jsxRuntimeExports.jsxs(b1,{children:[o.jsxRuntimeExports.jsxs(R1,{children:[n,o.jsxRuntimeExports.jsx($1,{})]}),e]}),b1=s.div`
|
|
2267
2269
|
position: relative;
|
|
2268
2270
|
display: contents;
|
|
2269
2271
|
`,R1=s.div`
|
|
@@ -2626,7 +2628,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2626
2628
|
background-color: ${e=>e.theme.colors.grey3};
|
|
2627
2629
|
min-height: 1px;
|
|
2628
2630
|
max-height: 1px;
|
|
2629
|
-
`,to=(e,n)=>{const r=t.appLocale.getLocalizedStrings().subscriptionUpdate,{groups:i}=r.dropDowns,a=[];return n!=null&&a.push({label:i.recommendedPlan,options:e.filter(d=>d.subscriptionPlanId===n).map(d=>({label:d.name,value:d.subscriptionPlanId}))}),a.push({label:i.allPlans,options:e.filter(d=>d.subscriptionPlanId!==n).map(d=>({label:d.name,value:d.subscriptionPlanId}))}),a},dn=(e,n)=>e==null?void 0:`${(t.amountToString("0,0.00",e)+" "+cS(n)).trim()}`,cS=e=>{if(e==null)return"";const{count:n,unit:r}=e;return n===1?`/ ${r.substring(0,1).toUpperCase().concat(r.substring(1))}`:`/ ${r.substring(0,1).toUpperCase().concat(r.substring(1))} x ${n}`},dS=t.appLocale.getLocalizedStrings().common,vr="subscriptionUpdatePlanPage",pn="updatePlan",Dt="applyChanges";function pS(e){const n=t.useWindowSizeContext(),r=o.useTheme(),{localData:i,isDisabled:a,onSubscriptionDetailsChanged:d,onEstimateSuccess:l,onReviewClick:c,onBackClick:p,onResetClick:m}=e,[x,g]=u.useState(void 0),h=u.useRef(null),{data:C,subscriptionDetail:b,fetchState:S,estimateStatus:y}=i,j=t.usePrevious(y.fetchState),f=t.usePrevious(S),E=o.useForm({mode:"all",reValidateMode:"onChange",defaultValues:u.useMemo(()=>kr(i),[i])});u.useEffect(()=>()=>{g(void 0)},[]),u.useEffect(()=>{f==="In-Progress"&&S==="Completed"&&E.reset(kr(i))},[f,S,E,i]),u.useEffect(()=>{j==="In-Progress"&&(y.fetchState==="Error"?x!==y.fetchState&&g(y.fetchState):y.fetchState==="Completed"&&(g(void 0),l()))},[x,j,y.fetchState,l]);const $=async(R,
|
|
2631
|
+
`,to=(e,n)=>{const r=t.appLocale.getLocalizedStrings().subscriptionUpdate,{groups:i}=r.dropDowns,a=[];return n!=null&&a.push({label:i.recommendedPlan,options:e.filter(d=>d.subscriptionPlanId===n).map(d=>({label:d.name,value:d.subscriptionPlanId}))}),a.push({label:i.allPlans,options:e.filter(d=>d.subscriptionPlanId!==n).map(d=>({label:d.name,value:d.subscriptionPlanId}))}),a},dn=(e,n)=>e==null?void 0:`${(t.amountToString("0,0.00",e)+" "+cS(n)).trim()}`,cS=e=>{if(e==null)return"";const{count:n,unit:r}=e;return n===1?`/ ${r.substring(0,1).toUpperCase().concat(r.substring(1))}`:`/ ${r.substring(0,1).toUpperCase().concat(r.substring(1))} x ${n}`},dS=t.appLocale.getLocalizedStrings().common,vr="subscriptionUpdatePlanPage",pn="updatePlan",Dt="applyChanges";function pS(e){const n=t.useWindowSizeContext(),r=o.useTheme(),{localData:i,isDisabled:a,onSubscriptionDetailsChanged:d,onEstimateSuccess:l,onReviewClick:c,onBackClick:p,onResetClick:m}=e,[x,g]=u.useState(void 0),h=u.useRef(null),{data:C,subscriptionDetail:b,fetchState:S,estimateStatus:y}=i,j=t.usePrevious(y.fetchState),f=t.usePrevious(S),E=o.useForm({mode:"all",reValidateMode:"onChange",defaultValues:u.useMemo(()=>kr(i),[i])});u.useEffect(()=>()=>{g(void 0)},[]),u.useEffect(()=>{f==="In-Progress"&&S==="Completed"&&E.reset(kr(i))},[f,S,E,i]),u.useEffect(()=>{j==="In-Progress"&&(y.fetchState==="Error"?x!==y.fetchState&&g(y.fetchState):y.fetchState==="Completed"&&(g(void 0),l()))},[x,j,y.fetchState,l]);const $=async(R,T)=>{if(R.includes(pn)||R.includes(Dt)){if(R.includes(Dt)){const{applyChanges:V}=T,{changeType:W,shouldProrate:v}=V;W==="applyImmediately"&&C?.applyEndOfTerm===!0&&v===!1?E.setValue(Dt,{...V,shouldProrate:!0},{shouldDirty:!0}):W==="applyEndOfTerm"&&C?.applyEndOfTerm===!1&&v===!0&&E.setValue(Dt,{...V,shouldProrate:!1},{shouldDirty:!0})}d(T)}};u.useEffect(()=>{const R=E.watch((T,{name:V})=>{V!=null&&T!=null&&o.defer(()=>$(V,T))});return()=>{R.unsubscribe()}});const A=E.handleSubmit(R=>{x!=null&&g(void 0),c()}),I=()=>O?.status.code!=="future"?o.jsxRuntimeExports.jsx(i1,{sectionId:Dt,style:{paddingBottom:t.Space.sp9},subscriptionUpdateData:C,subscriptionTermEndDate:O?.currentTerm?.end,isSubscriptionDetailsChanged:ra(i),isDisabled:a}):null,{updatePlan:w,snackBar:k,footer:N}=t.appLocale.getLocalizedStrings().subscriptionUpdate,{title:D}=w,G=b?.summary?.summary,O=b?.subscription.subscription,Z=b?.plan?.plan.subscriptionPlanId,q=G?.recommendedSubscriptionPlanId!=null&&Z===G?.primarySubscriptionPlanId?G?.recommendedSubscriptionPlanId:void 0;return o.jsxRuntimeExports.jsxs(uS,{children:[o.jsxRuntimeExports.jsx(t.NavBar,{title:D,backgroundColor:r.colors.grey4,style:{zIndex:3},onBackClick:p,scrollableContent:h,source:"SubscriptionUpdatePlanPage"}),x!=null?o.jsxRuntimeExports.jsx(t.SubscriptionSnackBar,{fetchState:x,customMessageText:y.error?.message??k.failedText,onRemoveSnackbar:()=>g(void 0)}):null,o.jsxRuntimeExports.jsx(xS,{ref:h,windowSize:n,children:S==="In-Progress"||S==="Not-Started"?o.jsxRuntimeExports.jsx(mS,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"Large",start:!0})}):o.jsxRuntimeExports.jsx(o.FormProvider,{...E,children:o.jsxRuntimeExports.jsxs("form",{id:wr(vr),onSubmit:A,children:[o.jsxRuntimeExports.jsx(iS,{sectionId:pn,subscriptionUpdateData:C,recommendedSubscriptionPlanId:q,subscriptionMetaDetails:oo(i),isDisabled:a}),o.jsxRuntimeExports.jsx(I,{})]})})}),t.formHasDirtyFields(E.formState.dirtyFields)||hS(i)?o.jsxRuntimeExports.jsx(t.Footer,{formId:wr(vr),primaryBtn:{label:N.review,isLoading:y.fetchState==="In-Progress",isDisabled:e.isDisabled!=null&&y.fetchState!=="In-Progress"},cancelBtn:{label:dS.cancel,shouldResetOnCancel:!0,onClick:()=>{E.reset(gS(i)),b!=null&&m(b)}}}):null]})}const uS=s.div`
|
|
2630
2632
|
display: flex;
|
|
2631
2633
|
min-height: 100%;
|
|
2632
2634
|
flex-direction: column;
|
|
@@ -2647,7 +2649,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2647
2649
|
justify-content: center;
|
|
2648
2650
|
height: 100%;
|
|
2649
2651
|
overflow-y: auto;
|
|
2650
|
-
`,wr=e=>`${e}_form`,kr=e=>{const{data:n,subscriptionDetail:r}=e,i=r?.summary?.summary,a=r?.subscription.subscription.subscriptionPlanId,{plans:d,addOns:l,coupons:c}=oo(e),p=i?.recommendedSubscriptionPlanId!=null&&a===i?.primarySubscriptionPlanId?i?.recommendedSubscriptionPlanId:void 0;return{[pn]:{subscriptionPlan:{selectedOption:n?.subscriptionPlanId,allOptions:to(d,p)},recurringAddOns:hn(l,n?.subscriptionAddOnIds),coupon:{selectedOption:n?.subscriptionCouponIds[0],allOptions:c.map(m=>({label:m.name,value:m.subscriptionCouponId}))}},[Dt]:{changeType:n?.applyEndOfTerm===!0?"applyEndOfTerm":"applyImmediately",shouldProrate:n?.shouldProrate===!0}}},hn=(e,n)=>n?.map(r=>{const i=e.map(a=>({label:a.name,value:a.subscriptionAddOnId,isDisabled:a.subscriptionAddOnId!==r&&n?.includes(a.subscriptionAddOnId)}));return{selectedOption:r,allOptions:i}})??[],oo=e=>{const{subscriptionMetaDetails:n}=e,r=n.plans.filter(d=>d.plan.statusCode==="active").map(d=>d.plan),i=n.addOns.filter(d=>d.addOn.statusCode==="active"&&d.addOn.chargeType==="recurring").map(d=>d.addOn),a=n.coupons.filter(d=>d.coupon.statusCode==="active").map(d=>d.coupon);return{plans:r,addOns:i,coupons:a}},hS=e=>{const{data:n,subscriptionDetail:r}=e;if(n==null||r==null)return!1;const i=r.subscription.subscription.status.code;return[ra(e),!o.isEqual(n.applyEndOfTerm,i!=="future"),!o.isEqual(n.shouldProrate,i==="future"),!o.isEqual(n.invoiceImmediately,!0)].reduce((a,d)=>a||d,!1)},ra=e=>{const{data:n,subscriptionDetail:r}=e;return n==null||r==null?!1:[!o.isEqual(n.subscriptionPlanId,r.plan?.plan.subscriptionPlanId),!o.isEqual(n.subscriptionAddOnIds,r.addOns?.map(i=>i.addOn.subscriptionAddOnId)),!o.isEqual(n.subscriptionCouponIds,r.coupons?.map(i=>i.coupon.subscriptionCouponId))].reduce((i,a)=>i||a,!1)},gS=e=>{const{subscriptionDetail:n}=e,r=n?.subscription.subscription.status.code,i=n?.summary?.summary,a=n?.subscription.subscription.subscriptionPlanId,{plans:d,addOns:l,coupons:c}=oo(e),p=i?.recommendedSubscriptionPlanId!=null&&a===i?.primarySubscriptionPlanId?i?.recommendedSubscriptionPlanId:void 0;return{[pn]:{subscriptionPlan:{selectedOption:a,allOptions:to(d,p)},recurringAddOns:hn(l,n?.addOns.map(m=>m.addOn.subscriptionAddOnId)),coupon:{selectedOption:n?.coupons[0]?.coupon.subscriptionCouponId,allOptions:c.map(m=>({label:m.name,value:m.subscriptionCouponId}))}},[Dt]:{changeType:r==="future"?"applyImmediately":"applyEndOfTerm",shouldProrate:r==="future"}}},SS=t.appLocale.getLocalizedStrings().common,zn={labelWidth:new t.ResponsiveSized(115,145,155),mediumLabelWidth:new t.ResponsiveSized(140,160,170),largeLabelWidth:new t.ResponsiveSized(160,210,210),paddingBottom:new t.ResponsiveSized(t.sp[3],t.sp[2])};function yS({sectionId:e,isDisabled:n,subscriptionCreateData:r,subscriptionMetaDetails:i,recommendedSubscriptionPlanId:a,style:d}){const l=t.useWindowSizeContext(),c=t.appLocale.getLocalizedStrings().subscriptionUpdate,{dateFormat:{visual:p}}=t.appLocale.getLocalizedStrings(),{labels:m,placeholders:x}=c.dropDowns,g=zn.labelWidth.value(l),h=zn.mediumLabelWidth.value(l),C=zn.largeLabelWidth.value(l),{plans:b,addOns:S,coupons:y}=i;return o.jsxRuntimeExports.jsx(fS,{style:d,children:o.jsxRuntimeExports.jsxs(CS,{children:[o.jsxRuntimeExports.jsx(na,{label:{label:m.planName,width:h},isDisabled:n,groupedSingleSelectField:{name:Uo(e,"subscriptionPlan"),placeholder:x.selectPlan,valueToInfo:j=>{const f=b.find(E=>E.subscriptionPlanId===j);return t.amountToString("0,0.00",f?.price)},defaultValue:{selectedOption:r?.subscriptionPlanId,allOptions:to(b,a)},registerOptions:{required:!0,validate:j=>j!=null&&j.selectedOption!=null||n!=null}},valueToAdditionalLabel:j=>{const f=b.find(E=>E.subscriptionPlanId===j);return dn(f?.price,f?.period)??""}}),o.jsxRuntimeExports.jsx(Ho,{}),o.jsxRuntimeExports.jsx(sa,{label:{label:m.recurringAddOns,width:g},isDisabled:n,singleSelectPickerField:{name:Uo(e,"recurringAddOns"),placeholder:x.selectAddOn,valueToInfo:j=>{const f=S.find(E=>E.subscriptionAddOnId===j);return t.amountToString("0,0.00",f?.price)}},valueToAdditionalLabel:j=>{const f=S.find(E=>E.subscriptionAddOnId===j);return dn(f?.price,f?.period)??""},defaultValues:r?.subscriptionAddOnIds??[],allOptions:S.map(j=>({label:j.name,value:j.subscriptionAddOnId}))}),o.jsxRuntimeExports.jsx(Ho,{}),o.jsxRuntimeExports.jsx(t.LabeledItemWithButton,{isDisabled:"readonly",label:{label:m.nonRecurringAddOns,width:C},style:{opacity:.32},button:{buttonTitle:SS.add,style:{pointerEvents:"none"}}}),o.jsxRuntimeExports.jsx(Ho,{}),o.jsxRuntimeExports.jsx(t.LabeledSingleSelectPickerField,{isDisabled:n,label:{label:m.coupon,width:g},singleSelectPickerField:{name:Uo(e,"coupon"),placeholder:x.selectCoupon,defaultValue:{selectedOption:r?.subscriptionCouponIds[0],allOptions:y.map(j=>({label:j.name,value:j.subscriptionCouponId}))}}}),o.jsxRuntimeExports.jsx(Ho,{}),o.jsxRuntimeExports.jsx(t.LabeledDatePickerField,{isDisabled:n,label:{label:m.startDate,width:g},dateField:{name:Uo(e,"planStartDate"),placeholder:x.selectStartDate,defaultValue:r?.startDate,dateFormat:p.defaultInput,minDate:
|
|
2652
|
+
`,wr=e=>`${e}_form`,kr=e=>{const{data:n,subscriptionDetail:r}=e,i=r?.summary?.summary,a=r?.subscription.subscription.subscriptionPlanId,{plans:d,addOns:l,coupons:c}=oo(e),p=i?.recommendedSubscriptionPlanId!=null&&a===i?.primarySubscriptionPlanId?i?.recommendedSubscriptionPlanId:void 0;return{[pn]:{subscriptionPlan:{selectedOption:n?.subscriptionPlanId,allOptions:to(d,p)},recurringAddOns:hn(l,n?.subscriptionAddOnIds),coupon:{selectedOption:n?.subscriptionCouponIds[0],allOptions:c.map(m=>({label:m.name,value:m.subscriptionCouponId}))}},[Dt]:{changeType:n?.applyEndOfTerm===!0?"applyEndOfTerm":"applyImmediately",shouldProrate:n?.shouldProrate===!0}}},hn=(e,n)=>n?.map(r=>{const i=e.map(a=>({label:a.name,value:a.subscriptionAddOnId,isDisabled:a.subscriptionAddOnId!==r&&n?.includes(a.subscriptionAddOnId)}));return{selectedOption:r,allOptions:i}})??[],oo=e=>{const{subscriptionMetaDetails:n}=e,r=n.plans.filter(d=>d.plan.statusCode==="active").map(d=>d.plan),i=n.addOns.filter(d=>d.addOn.statusCode==="active"&&d.addOn.chargeType==="recurring").map(d=>d.addOn),a=n.coupons.filter(d=>d.coupon.statusCode==="active").map(d=>d.coupon);return{plans:r,addOns:i,coupons:a}},hS=e=>{const{data:n,subscriptionDetail:r}=e;if(n==null||r==null)return!1;const i=r.subscription.subscription.status.code;return[ra(e),!o.isEqual(n.applyEndOfTerm,i!=="future"),!o.isEqual(n.shouldProrate,i==="future"),!o.isEqual(n.invoiceImmediately,!0)].reduce((a,d)=>a||d,!1)},ra=e=>{const{data:n,subscriptionDetail:r}=e;return n==null||r==null?!1:[!o.isEqual(n.subscriptionPlanId,r.plan?.plan.subscriptionPlanId),!o.isEqual(n.subscriptionAddOnIds,r.addOns?.map(i=>i.addOn.subscriptionAddOnId)),!o.isEqual(n.subscriptionCouponIds,r.coupons?.map(i=>i.coupon.subscriptionCouponId))].reduce((i,a)=>i||a,!1)},gS=e=>{const{subscriptionDetail:n}=e,r=n?.subscription.subscription.status.code,i=n?.summary?.summary,a=n?.subscription.subscription.subscriptionPlanId,{plans:d,addOns:l,coupons:c}=oo(e),p=i?.recommendedSubscriptionPlanId!=null&&a===i?.primarySubscriptionPlanId?i?.recommendedSubscriptionPlanId:void 0;return{[pn]:{subscriptionPlan:{selectedOption:a,allOptions:to(d,p)},recurringAddOns:hn(l,n?.addOns.map(m=>m.addOn.subscriptionAddOnId)),coupon:{selectedOption:n?.coupons[0]?.coupon.subscriptionCouponId,allOptions:c.map(m=>({label:m.name,value:m.subscriptionCouponId}))}},[Dt]:{changeType:r==="future"?"applyImmediately":"applyEndOfTerm",shouldProrate:r==="future"}}},SS=t.appLocale.getLocalizedStrings().common,zn={labelWidth:new t.ResponsiveSized(115,145,155),mediumLabelWidth:new t.ResponsiveSized(140,160,170),largeLabelWidth:new t.ResponsiveSized(160,210,210),paddingBottom:new t.ResponsiveSized(t.sp[3],t.sp[2])};function yS({sectionId:e,isDisabled:n,subscriptionCreateData:r,subscriptionMetaDetails:i,recommendedSubscriptionPlanId:a,style:d}){const l=t.useWindowSizeContext(),c=t.appLocale.getLocalizedStrings().subscriptionUpdate,{dateFormat:{visual:p}}=t.appLocale.getLocalizedStrings(),{labels:m,placeholders:x}=c.dropDowns,g=zn.labelWidth.value(l),h=zn.mediumLabelWidth.value(l),C=zn.largeLabelWidth.value(l),{plans:b,addOns:S,coupons:y}=i;return o.jsxRuntimeExports.jsx(fS,{style:d,children:o.jsxRuntimeExports.jsxs(CS,{children:[o.jsxRuntimeExports.jsx(na,{label:{label:m.planName,width:h},isDisabled:n,groupedSingleSelectField:{name:Uo(e,"subscriptionPlan"),placeholder:x.selectPlan,valueToInfo:j=>{const f=b.find(E=>E.subscriptionPlanId===j);return t.amountToString("0,0.00",f?.price)},defaultValue:{selectedOption:r?.subscriptionPlanId,allOptions:to(b,a)},registerOptions:{required:!0,validate:j=>j!=null&&j.selectedOption!=null||n!=null}},valueToAdditionalLabel:j=>{const f=b.find(E=>E.subscriptionPlanId===j);return dn(f?.price,f?.period)??""}}),o.jsxRuntimeExports.jsx(Ho,{}),o.jsxRuntimeExports.jsx(sa,{label:{label:m.recurringAddOns,width:g},isDisabled:n,singleSelectPickerField:{name:Uo(e,"recurringAddOns"),placeholder:x.selectAddOn,valueToInfo:j=>{const f=S.find(E=>E.subscriptionAddOnId===j);return t.amountToString("0,0.00",f?.price)}},valueToAdditionalLabel:j=>{const f=S.find(E=>E.subscriptionAddOnId===j);return dn(f?.price,f?.period)??""},defaultValues:r?.subscriptionAddOnIds??[],allOptions:S.map(j=>({label:j.name,value:j.subscriptionAddOnId}))}),o.jsxRuntimeExports.jsx(Ho,{}),o.jsxRuntimeExports.jsx(t.LabeledItemWithButton,{isDisabled:"readonly",label:{label:m.nonRecurringAddOns,width:C},style:{opacity:.32},button:{buttonTitle:SS.add,style:{pointerEvents:"none"}}}),o.jsxRuntimeExports.jsx(Ho,{}),o.jsxRuntimeExports.jsx(t.LabeledSingleSelectPickerField,{isDisabled:n,label:{label:m.coupon,width:g},singleSelectPickerField:{name:Uo(e,"coupon"),placeholder:x.selectCoupon,defaultValue:{selectedOption:r?.subscriptionCouponIds[0],allOptions:y.map(j=>({label:j.name,value:j.subscriptionCouponId}))}}}),o.jsxRuntimeExports.jsx(Ho,{}),o.jsxRuntimeExports.jsx(t.LabeledDatePickerField,{isDisabled:n,label:{label:m.startDate,width:g},dateField:{name:Uo(e,"planStartDate"),placeholder:x.selectStartDate,defaultValue:r?.startDate,dateFormat:p.defaultInput,minDate:ee.dateNow(),autoComplete:"off"}})]})})}const Uo=(e,n)=>`${e}.${n}`,fS=s.div`
|
|
2651
2653
|
display: flex;
|
|
2652
2654
|
flex-direction: column;
|
|
2653
2655
|
padding-top: ${t.Space.sp3};
|
|
@@ -2684,7 +2686,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2684
2686
|
`,kS=s.div`
|
|
2685
2687
|
display: flex;
|
|
2686
2688
|
flex-direction: column;
|
|
2687
|
-
`,TS=t.appLocale.getLocalizedStrings().common,Tr="subscriptionAddPlanPage",un="addPlan",mn="invoiceOption";function PS(e){const n=t.useWindowSizeContext(),r=o.useTheme(),i=u.useRef(null),{localData:a,isDisabled:d,onSubscriptionDetailsChanged:l,onEstimateSuccess:c,onReviewClick:p,onBackClick:m,onResetClick:x}=e,[g,h]=u.useState(void 0),{data:C,fetchState:b,estimateStatus:S}=a,y=t.usePrevious(S.fetchState),j=t.usePrevious(b),f=o.useForm({mode:"all",reValidateMode:"onChange",defaultValues:u.useMemo(()=>Ir(a),[a])});u.useEffect(()=>()=>{h(void 0)},[]),u.useEffect(()=>{j==="In-Progress"&&b==="Completed"&&f.reset(Ir(a))},[j,b,f,a]),u.useEffect(()=>{y==="In-Progress"&&(S.fetchState==="Error"?g!==S.fetchState&&h(S.fetchState):S.fetchState==="Completed"&&(h(void 0),c()))},[g,y,S.fetchState,c]);const E=async(
|
|
2689
|
+
`,TS=t.appLocale.getLocalizedStrings().common,Tr="subscriptionAddPlanPage",un="addPlan",mn="invoiceOption";function PS(e){const n=t.useWindowSizeContext(),r=o.useTheme(),i=u.useRef(null),{localData:a,isDisabled:d,onSubscriptionDetailsChanged:l,onEstimateSuccess:c,onReviewClick:p,onBackClick:m,onResetClick:x}=e,[g,h]=u.useState(void 0),{data:C,fetchState:b,estimateStatus:S}=a,y=t.usePrevious(S.fetchState),j=t.usePrevious(b),f=o.useForm({mode:"all",reValidateMode:"onChange",defaultValues:u.useMemo(()=>Ir(a),[a])});u.useEffect(()=>()=>{h(void 0)},[]),u.useEffect(()=>{j==="In-Progress"&&b==="Completed"&&f.reset(Ir(a))},[j,b,f,a]),u.useEffect(()=>{y==="In-Progress"&&(S.fetchState==="Error"?g!==S.fetchState&&h(S.fetchState):S.fetchState==="Completed"&&(h(void 0),c()))},[g,y,S.fetchState,c]);const E=async(N,D)=>{(N.includes(un)||N.includes(mn))&&l(D)};u.useEffect(()=>{const N=f.watch((D,{name:G})=>{G!=null&&D!=null&&o.defer(()=>E(G,D))});return()=>{N.unsubscribe()}});const $=f.handleSubmit(N=>{g!=null&&h(void 0),p()}),{addPlan:A,snackBar:I,footer:w}=t.appLocale.getLocalizedStrings().subscriptionUpdate,{title:k}=A;return o.jsxRuntimeExports.jsxs(IS,{children:[o.jsxRuntimeExports.jsx(t.NavBar,{title:k,backgroundColor:r.colors.grey4,style:{zIndex:3},onBackClick:m,scrollableContent:i,source:"SubscriptionAddPlanPage"}),g!=null?o.jsxRuntimeExports.jsx(t.SubscriptionSnackBar,{fetchState:g,customMessageText:S.error?.message??I.failedText,onRemoveSnackbar:()=>h(void 0)}):null,o.jsxRuntimeExports.jsx(AS,{ref:i,windowSize:n,children:b==="In-Progress"||b==="Not-Started"?o.jsxRuntimeExports.jsx(LS,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"Large",start:!0})}):o.jsxRuntimeExports.jsx(o.FormProvider,{...f,children:o.jsxRuntimeExports.jsxs("form",{id:Pr(Tr),onSubmit:$,children:[o.jsxRuntimeExports.jsx(yS,{sectionId:un,subscriptionCreateData:C,subscriptionMetaDetails:oo(a),isDisabled:d}),o.jsxRuntimeExports.jsx(bS,{sectionId:mn,style:{paddingBottom:t.Space.sp9},subscriptionCreateData:C,isDisabled:d})]})})}),t.formHasDirtyFields(f.formState.dirtyFields)||DS(a)?o.jsxRuntimeExports.jsx(t.Footer,{formId:Pr(Tr),primaryBtn:{label:w.review,isLoading:S.fetchState==="In-Progress",isDisabled:e.isDisabled!=null&&S.fetchState!=="In-Progress"},cancelBtn:{label:TS.cancel,shouldResetOnCancel:!0,onClick:()=>{f.reset(OS(a)),x()}}}):null]})}const IS=s.div`
|
|
2688
2690
|
display: flex;
|
|
2689
2691
|
min-height: 100%;
|
|
2690
2692
|
flex-direction: column;
|
|
@@ -2705,7 +2707,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2705
2707
|
justify-content: center;
|
|
2706
2708
|
height: 100%;
|
|
2707
2709
|
overflow-y: auto;
|
|
2708
|
-
`,Pr=e=>`${e}_form`,Ir=e=>{const{data:n}=e,{plans:r,addOns:i,coupons:a}=oo(e);return{[un]:{subscriptionPlan:{selectedOption:n?.subscriptionPlanId,allOptions:to(r)},recurringAddOns:hn(i,n?.subscriptionAddOnIds),coupon:{selectedOption:n?.subscriptionCouponIds[0],allOptions:a.map(d=>({label:d.name,value:d.subscriptionCouponId}))},planStartDate:n?.startDate?.toDate()},[mn]:{invoicingOption:"invoiceNow"}}},DS=e=>{const{data:n}=e;return n==null?!1:[!o.isEqual(n.subscriptionPlanId,void 0),!o.isEqual(n.subscriptionAddOnIds,[]),!o.isEqual(n.subscriptionCouponIds,[]),!o.isEqual(n.startDate,void 0),!o.isEqual(n.invoiceImmediately,!0)].reduce((r,i)=>r||i,!1)},OS=e=>{const{plans:n,addOns:r,coupons:i}=oo(e);return{[un]:{subscriptionPlan:{selectedOption:void 0,allOptions:to(n)},recurringAddOns:hn(r),coupon:{selectedOption:void 0,allOptions:i.map(a=>({label:a.name,value:a.subscriptionCouponId}))},planStartDate:void 0},[mn]:{invoicingOption:"invoiceNow"}}},Gt=t.appLocale.getLocalizedStrings().cockpit.portfolio.header,Mt=[{key:"companyName",value:Gt.name,sortOrder:"ascending",width:new t.ResponsiveSized(344,344),isThreadAllowed:!0},{key:"runway",value:Gt.runway,sortOrder:"ascending",width:new t.ResponsiveSized(155,155),isThreadAllowed:!0},{key:"cashBalance",value:Gt.cashbalance,sortOrder:"ascending",width:new t.ResponsiveSized(229,229),isThreadAllowed:!0},{key:"expenses",value:Gt.expenses,sortOrder:"ascending",width:new t.ResponsiveSized(228,228),isThreadAllowed:!0},{key:"revenues",value:Gt.revenues,sortOrder:"ascending",width:new t.ResponsiveSized(239,239),isThreadAllowed:!0},{key:"netIncome",value:Gt.netincome,sortOrder:"ascending",width:new t.ResponsiveSized(140,140),isThreadAllowed:!0}];Mt.map(e=>e.key);const NS={headerLastColumnRightPadding:new t.ResponsiveSized(30,82)};function MS({companyNameSticky:e,onColumnSortConfigChanged:n,sortConfig:r}){const i=t.useWindowSizeContext(),[a,d]=u.useState(o.cloneDeep(Mt));u.useEffect(()=>{const c=[...a];for(const p of c)p.key===r.sortKey?p.sortOrder=r.sortOrder:p.sortOrder="ascending";d(c)},[r.sortKey,r.sortOrder]);const l=(c,p)=>{let m=p;r.sortKey===c&&(m=p==="ascending"?"descending":"ascending"),n(c,m)};return o.jsxRuntimeExports.jsx(FS,{height:Ft,companyNameSticky:e,windowSize:i,children:a.map(c=>o.jsxRuntimeExports.jsxs(BS,{companyNameSticky:e&&c.key==="companyName",sortDataValue:r.sortKey,actualDataValue:c.key,wrapperWidth:c.width,windowSize:i,children:[o.jsxRuntimeExports.jsxs(US,{onClick:()=>l(
|
|
2710
|
+
`,Pr=e=>`${e}_form`,Ir=e=>{const{data:n}=e,{plans:r,addOns:i,coupons:a}=oo(e);return{[un]:{subscriptionPlan:{selectedOption:n?.subscriptionPlanId,allOptions:to(r)},recurringAddOns:hn(i,n?.subscriptionAddOnIds),coupon:{selectedOption:n?.subscriptionCouponIds[0],allOptions:a.map(d=>({label:d.name,value:d.subscriptionCouponId}))},planStartDate:n?.startDate?.toDate()},[mn]:{invoicingOption:"invoiceNow"}}},DS=e=>{const{data:n}=e;return n==null?!1:[!o.isEqual(n.subscriptionPlanId,void 0),!o.isEqual(n.subscriptionAddOnIds,[]),!o.isEqual(n.subscriptionCouponIds,[]),!o.isEqual(n.startDate,void 0),!o.isEqual(n.invoiceImmediately,!0)].reduce((r,i)=>r||i,!1)},OS=e=>{const{plans:n,addOns:r,coupons:i}=oo(e);return{[un]:{subscriptionPlan:{selectedOption:void 0,allOptions:to(n)},recurringAddOns:hn(r),coupon:{selectedOption:void 0,allOptions:i.map(a=>({label:a.name,value:a.subscriptionCouponId}))},planStartDate:void 0},[mn]:{invoicingOption:"invoiceNow"}}},Gt=t.appLocale.getLocalizedStrings().cockpit.portfolio.header,Mt=[{key:"companyName",value:Gt.name,sortOrder:"ascending",width:new t.ResponsiveSized(344,344),isThreadAllowed:!0},{key:"runway",value:Gt.runway,sortOrder:"ascending",width:new t.ResponsiveSized(155,155),isThreadAllowed:!0},{key:"cashBalance",value:Gt.cashbalance,sortOrder:"ascending",width:new t.ResponsiveSized(229,229),isThreadAllowed:!0},{key:"expenses",value:Gt.expenses,sortOrder:"ascending",width:new t.ResponsiveSized(228,228),isThreadAllowed:!0},{key:"revenues",value:Gt.revenues,sortOrder:"ascending",width:new t.ResponsiveSized(239,239),isThreadAllowed:!0},{key:"netIncome",value:Gt.netincome,sortOrder:"ascending",width:new t.ResponsiveSized(140,140),isThreadAllowed:!0}];Mt.map(e=>e.key);const NS={headerLastColumnRightPadding:new t.ResponsiveSized(30,82)};function MS({companyNameSticky:e,onColumnSortConfigChanged:n,sortConfig:r}){const i=t.useWindowSizeContext(),[a,d]=u.useState(o.cloneDeep(Mt));u.useEffect(()=>{const c=[...a];for(const p of c)p.key===r.sortKey?p.sortOrder=r.sortOrder:p.sortOrder="ascending";d(c)},[r.sortKey,r.sortOrder]);const l=(c,p)=>{let m=p;r.sortKey===c&&(m=p==="ascending"?"descending":"ascending"),n(c,m)};return o.jsxRuntimeExports.jsx(FS,{height:Ft,companyNameSticky:e,windowSize:i,children:a.map(c=>o.jsxRuntimeExports.jsxs(BS,{companyNameSticky:e&&c.key==="companyName",sortDataValue:r.sortKey,actualDataValue:c.key,wrapperWidth:c.width,windowSize:i,children:[o.jsxRuntimeExports.jsxs(US,{onClick:()=>l(ee.toPortfolioSortKeyType(c.key),c.sortOrder),children:[o.jsxRuntimeExports.jsx(t.ExtraSmallRegular,{children:c.value}),o.jsxRuntimeExports.jsx(_S,{sortDataValue:r.sortKey,headerdata:c,children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:12,height:12})})]}),o.jsxRuntimeExports.jsx(VS,{sortDataValue:r.sortKey,windowSize:i,isVisible:r.sortKey===c.key&&c.key!=="runway",children:o.jsxRuntimeExports.jsx(WS,{onClick:()=>l("runway","ascending")})})]},c.key))})}const zS=u.memo(MS),FS=s(t.SmallRegular)`
|
|
2709
2711
|
top: ${e=>e.companyNameSticky?0:t.Space.sp12};
|
|
2710
2712
|
left: 0;
|
|
2711
2713
|
min-height: ${e=>e.height}px;
|
|
@@ -2754,7 +2756,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2754
2756
|
&:hover {
|
|
2755
2757
|
color: ${e=>e.theme.colors.primary};
|
|
2756
2758
|
}
|
|
2757
|
-
`,HS=t.appLocale.getLocalizedStrings(),{common:{strings:KS},cockpit:{portfolio:{header:{runway:GS}}}}=HS,YS=({companyView:e,companyNameSticky:n,totalHeight:r,addThreadRequestThreadId:i,setNoteData:a,setElementRef:d,setAddThreadRequestThreadId:l,onCompanyNameClicked:c,onPassportIconClicked:p})=>{const m=t.useWindowSizeContext(),{accountingSummary:x,company:g}=e,{companyId:h,name:C}=g.company.companyInfo,b=`cockpit_${h}`,S="portfolio.notes",{threads:y,isLoading:j}=t.useFilteredThreads({entityType:S,companyId:h},!1),{openThread:f,threads:E,addThread:$,removeThread:A,setOpenThread:I,setRequestToOpenThread:
|
|
2759
|
+
`,HS=t.appLocale.getLocalizedStrings(),{common:{strings:KS},cockpit:{portfolio:{header:{runway:GS}}}}=HS,YS=({companyView:e,companyNameSticky:n,totalHeight:r,addThreadRequestThreadId:i,setNoteData:a,setElementRef:d,setAddThreadRequestThreadId:l,onCompanyNameClicked:c,onPassportIconClicked:p})=>{const m=t.useWindowSizeContext(),{accountingSummary:x,company:g}=e,{companyId:h,name:C}=g.company.companyInfo,b=`cockpit_${h}`,S="portfolio.notes",{threads:y,isLoading:j}=t.useFilteredThreads({entityType:S,companyId:h},!1),{openThread:f,threads:E,addThread:$,removeThread:A,setOpenThread:I,setRequestToOpenThread:w}=u.useContext(t.ThreadsContext),k=u.useRef(null),N=f!==null?E.get(f):null,D=f?.includes(h)===!0,G=f!=null&&E.get(f)==null&&D,O=i!=null&&E.get(i)?.metadata.companyId===h,Z=u.useCallback(()=>{f?.includes(t.NEW_THREAD_SUFFIX)===!0&&A(f),i!=null&&l(void 0)},[i,f,A,l]),q=v=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:v.isElementThreadOpen??!1,isElementThreadPresent:v.isElementThreadPresent??!1,itemKey:v.itemKey,elementThreadId:v.elementThreadId??"",roomId:b,addThreadRequestThreadId:i,openThreadId:f,threadStyle:v.threadStyle,openThreadMetadata:N?.metadata??null,onElementClick:T,onAddThreadClick:V}),R=u.useCallback(v=>{if(v===f)I(null);else if(E.has(v))I(v);else if(v.includes(t.NEW_THREAD_SUFFIX)){const[L,J]=v.replace(t.NEW_THREAD_SUFFIX,"").split("."),re=_t(Rt(L),ee.toPortfolioSortKeyType(J),h,C);$(v,{type:"thread",visibility:"public",id:v,roomId:b,createdAt:new Date,updatedAt:new Date,comments:[],metadata:re,resolved:!1}),I(v)}},[h,C,f,b,E,$,I]),T=u.useCallback((v,L,J=!1)=>{const re=Mt.find(F=>F.key===L);if(w(null),re!=null&&(v.type==="contextmenu"||J===!0)){if(re.isThreadAllowed===!1)return;Z(),v.preventDefault(),v.stopPropagation();const F=t.toCollaborationEntityType({tab:"portfolio",key:re.key}),K=[...t.getFilteredThreads(E,{entityType:F,companyId:h},"both")],H=K.length>0&&K[0].length>0?K[0][0]:Pe("portfolio",re.key,h);E.has(H)?R(H):i===H?l(void 0):(l(H),I(null))}},[E,h,i,R,l,I,w,Z]),V=u.useCallback((v,L)=>{v.stopPropagation();const J=Pe("portfolio",L,h);l(void 0),R(J)},[h,l,R]),W={name:e.company.company.companyInfo.name,runway:x.runway,cashBalance:x.cashPosition?.balance,expenses:x.cogs?.balance&&x.expenses?.balance?ZS(x.cogs?.balance,x.expenses?.balance):void 0,netIncome:x.netBurnOrIncome?.balance,revenues:x.income?.balance};return o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{w(null),i!=null&&(l(void 0),i.includes(t.NEW_THREAD_SUFFIX)&&A(i))},children:o.jsxRuntimeExports.jsx(XS,{windowSize:m,isThreadOpen:D||O,totalHeight:r,isCreationInProgress:G,children:Mt.map((v,L)=>{const J=t.toCollaborationEntityType({tab:"portfolio",key:v.key}),re=[...t.getFilteredThreads(E,{entityType:J,companyId:h},"both")],F=Mt.length-2<=L,K=re.length>0&&re[0].length>0?re[0][0]:Pe("portfolio",v.key,h),H=E.get(K),_=H!=null&&H.resolved===!1,oe=K===f,ne=i===K;switch(v.key){case"companyName":return o.jsxRuntimeExports.jsxs(sy,{companyNameSticky:n,columnWidth:v.width,windowSize:m,isThreadOpen:oe||ne,isThreadAllowed:v.isThreadAllowed,className:te,onContextMenu:Y=>T(Y,v.key),ref:Y=>{d(h,v.key,Y)},children:[o.jsxRuntimeExports.jsxs(qS,{ref:k,children:[o.jsxRuntimeExports.jsx(QS,{onClick:Y=>{Y.preventDefault(),c(e)},children:W.name}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{anchorRef:k,isElementThreadOpen:oe,roomId:b,openThreadId:f,openThreadMetadata:N?.metadata??null})]}),o.jsxRuntimeExports.jsxs(ey,{children:[o.jsxRuntimeExports.jsxs(ty,{onClick:Y=>{Y.preventDefault(),a({roomId:b,companyId:h,companyName:C,entityType:S})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:y.length,isLoading:j}),o.jsxRuntimeExports.jsx(oy,{})]}),o.jsxRuntimeExports.jsx(ny,{onClick:Y=>{Y.preventDefault(),p(e)},children:o.jsxRuntimeExports.jsx(JS,{className:"passportIcon"})})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:_,itemKey:v.key,style:{left:t.Space.sp4},onElementClick:T}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Pe("portfolio",v.key,h),addThreadRequestThreadId:i,itemKey:v.key,onAddThreadClick:V})]},K);case"cashBalance":return o.jsxRuntimeExports.jsxs(po,{ref:Y=>{d(h,v.key,Y)},columnWidth:v.width,windowSize:m,isThreadAllowed:v.isThreadAllowed,className:te,onContextMenu:Y=>T(Y,v.key),children:[o.jsxRuntimeExports.jsx(Ko,{textColor:t.getCockpitColor("cashBalance"),wrapperWidth:v.width,windowSize:m,children:t.amountToString("0,0",W.cashBalance)}),q({isElementThreadOpen:oe,isElementThreadPresent:_,itemKey:v.key,elementThreadId:K,threadStyle:F?{right:t.Space.sp0}:void 0})]},K);case"expenses":return o.jsxRuntimeExports.jsxs(po,{ref:Y=>{d(h,v.key,Y)},columnWidth:v.width,windowSize:m,isThreadAllowed:v.isThreadAllowed,className:te,onContextMenu:Y=>T(Y,v.key),children:[o.jsxRuntimeExports.jsx(Ko,{textColor:t.getCockpitColor("expenses"),wrapperWidth:v.width,windowSize:m,children:t.amountToString("0,0",W.expenses)}),q({isElementThreadOpen:oe,isElementThreadPresent:_,itemKey:v.key,elementThreadId:K,threadStyle:F?{right:t.Space.sp0}:void 0})]},K);case"revenues":return o.jsxRuntimeExports.jsxs(po,{ref:Y=>{d(h,v.key,Y)},columnWidth:v.width,windowSize:m,isThreadAllowed:v.isThreadAllowed,className:te,onContextMenu:Y=>T(Y,v.key),children:[o.jsxRuntimeExports.jsx(Ko,{textColor:t.getCockpitColor("revenues"),wrapperWidth:v.width,windowSize:m,children:t.amountToString("0,0",W.revenues)}),q({isElementThreadOpen:oe,isElementThreadPresent:_,itemKey:v.key,elementThreadId:K,threadStyle:F?{right:t.Space.sp0}:void 0})]},K);case"netIncome":return o.jsxRuntimeExports.jsxs(po,{ref:Y=>{d(h,v.key,Y)},columnWidth:v.width,windowSize:m,isThreadAllowed:v.isThreadAllowed,className:te,onContextMenu:Y=>T(Y,v.key),children:[o.jsxRuntimeExports.jsx(Ko,{textColor:t.getCockpitColor("netIncome"),wrapperWidth:v.width,windowSize:m,children:t.amountToString("0,0",W.netIncome)}),q({isElementThreadOpen:oe,isElementThreadPresent:_,itemKey:v.key,elementThreadId:K,threadStyle:F?{right:t.Space.sp0}:void 0})]},K);case"runway":return o.jsxRuntimeExports.jsxs(po,{ref:Y=>{d(h,v.key,Y)},columnWidth:v.width,windowSize:m,isThreadAllowed:v.isThreadAllowed,className:te,onContextMenu:Y=>T(Y,v.key),children:[o.jsxRuntimeExports.jsx(ry,{wrapperWidth:v.width,windowSize:m,children:W.runway!=null?o.jsxRuntimeExports.jsx(t.Tooltip,{variant:"runway",data:W.runway,placement:"right",title:GS,children:o.jsxRuntimeExports.jsx(ay,{textColor:t.getCockpitColor(W.runway.runwayStatusCode)})}):o.jsxRuntimeExports.jsx(iy,{children:KS.hyphen})}),q({isElementThreadOpen:oe,isElementThreadPresent:_,itemKey:v.key,elementThreadId:K,threadStyle:F?{right:t.Space.sp0}:void 0})]},K);default:return null}})})})},ZS=(e,n)=>({amount:e.amount+n.amount,currencyCode:e.currencyCode,currencySymbol:e.currencySymbol}),XS=s.div`
|
|
2758
2760
|
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
2759
2761
|
border-radius: ${t.Space.sp2};
|
|
2760
2762
|
display: flex;
|
|
@@ -2776,7 +2778,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2776
2778
|
box-shadow: ${e=>`${t.Space.sp0} 2px ${t.Space.sp2} ${e.theme.colors.dropShadowHover}`};
|
|
2777
2779
|
}
|
|
2778
2780
|
|
|
2779
|
-
${e=>e.isThreadOpen?
|
|
2781
|
+
${e=>e.isThreadOpen?ve.css`
|
|
2780
2782
|
box-shadow: ${t.Space.sp0} 2px ${t.Space.sp2}
|
|
2781
2783
|
${e.theme.colors.dropShadowHover};
|
|
2782
2784
|
border: 1px solid ${e.theme.colors.primary};
|
|
@@ -2796,11 +2798,12 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2796
2798
|
border-color: ${e=>e.theme.colors.primary};
|
|
2797
2799
|
}
|
|
2798
2800
|
}
|
|
2799
|
-
${e=>e.isCreationInProgress?
|
|
2801
|
+
${e=>e.isCreationInProgress?ve.css`
|
|
2800
2802
|
border: 1px solid ${e.theme.colors.primary};
|
|
2801
2803
|
animation: animate 3s linear infinite;
|
|
2802
2804
|
`:null};
|
|
2803
2805
|
`,qS=s.div`
|
|
2806
|
+
position: relative;
|
|
2804
2807
|
cursor: pointer;
|
|
2805
2808
|
`,QS=s(t.LargeMediumSp)`
|
|
2806
2809
|
word-break: break-word;
|
|
@@ -2882,7 +2885,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2882
2885
|
height: 12px;
|
|
2883
2886
|
border-radius: 50%;
|
|
2884
2887
|
background-color: ${e=>e.textColor.color.toString()};
|
|
2885
|
-
`,ly=e=>le.createElement("svg",{width:48,height:49,viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},le.createElement("path",{d:"M23.994 6.29199C20.3944 6.29199 16.8756 7.3594 13.8826 9.35924C10.8897 11.3591 8.55692 14.2015 7.17941 17.5271C5.80189 20.8528 5.44147 24.5122 6.14372 28.0426C6.84597 31.5731 8.57935 34.816 11.1247 37.3613C13.67 39.9066 16.9129 41.64 20.4434 42.3423C23.9738 43.0445 27.6332 42.6841 30.9588 41.3066C34.2845 39.9291 37.1269 37.5963 39.1268 34.6034C41.1266 31.6104 42.194 28.0916 42.194 24.492C42.194 22.1019 41.7232 19.7353 40.8086 17.5271C39.894 15.319 38.5534 13.3127 36.8633 11.6226C35.1733 9.93262 33.167 8.59202 30.9588 7.67738C28.7507 6.76275 26.3841 6.29199 23.994 6.29199Z",fill:"#F9E3AE"}),le.createElement("path",{d:"M8.86603 42.1201C11.0593 44.2078 13.6416 45.8442 16.466 46.9361L44.69 18.7081V13.3861C43.8158 11.9373 42.7857 10.5886 41.618 9.36406L8.86603 42.1201ZM7.25203 40.4221L39.726 7.94806H34.76L5.14803 37.5601C5.77565 38.5661 6.47902 39.5229 7.25203 40.4221ZM4.79203 34.6061L32.276 7.12206L29.794 5.46606L3.60803 31.6521C3.93426 32.6628 4.32987 33.6498 4.79203 34.6061Z",fill:"#FFEFCA"}),le.createElement("path",{d:"M24 1.32788C19.417 1.32788 14.937 2.68689 11.1263 5.23307C7.31572 7.77924 4.34571 11.3982 2.59188 15.6323C0.838043 19.8665 0.37916 24.5256 1.27326 29.0205C2.16735 33.5154 4.37427 37.6443 7.61493 40.885C10.8556 44.1256 14.9845 46.3325 19.4794 47.2266C23.9743 48.1207 28.6334 47.6618 32.8675 45.908C37.1017 44.1542 40.7206 41.1842 43.2668 37.3735C45.813 33.5629 47.172 29.0829 47.172 24.4999C47.172 18.3543 44.7307 12.4604 40.3851 8.1148C36.0395 3.76921 30.1456 1.32788 24 1.32788ZM24 42.7079C21.0282 42.7036 18.1025 41.9717 15.4788 40.576C12.855 39.1803 10.613 37.1634 8.9485 34.7014C7.28402 32.2394 6.24775 29.4072 5.93024 26.4524C5.61273 23.4975 6.02363 20.5099 7.12705 17.7504C8.23047 14.991 9.99283 12.5438 12.2602 10.6225C14.5275 8.70128 17.2308 7.36449 20.1339 6.72895C23.037 6.0934 26.0516 6.17844 28.9143 6.97663C31.7769 7.77482 34.4006 9.26187 36.556 11.3079L37.118 11.8599C37.3313 12.0825 37.538 12.3085 37.738 12.5379C40.0344 15.1727 41.5236 18.4131 42.0276 21.8717C42.5315 25.3304 42.0289 28.861 40.5798 32.0416C39.1307 35.2222 36.7965 37.9183 33.856 39.8076C30.9155 41.697 27.4932 42.6997 23.998 42.6959L24 42.7079Z",fill:"#F6D397"}),le.createElement("path",{d:"M32.192 9.06799C32.3774 9.06725 32.5571 9.00433 32.7025 8.8893C32.8479 8.77426 32.9504 8.61378 32.9937 8.43354C33.0371 8.25331 33.0187 8.06374 32.9415 7.89521C32.8643 7.72667 32.7328 7.58891 32.568 7.50399C31.9491 7.19298 31.3135 6.91655 30.664 6.67599C30.4615 6.60992 30.2413 6.62464 30.0494 6.71706C29.8575 6.80949 29.7087 6.97247 29.6341 7.17199C29.5595 7.37151 29.5649 7.59213 29.6491 7.78779C29.7333 7.98345 29.8898 8.13901 30.086 8.22199C30.6776 8.44532 31.2571 8.69967 31.822 8.98399C31.9377 9.03856 32.064 9.06723 32.192 9.06799Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M24 0.5C19.2533 0.5 14.6131 1.90758 10.6663 4.54473C6.71954 7.18188 3.6434 10.9302 1.8269 15.3156C0.0103989 19.701 -0.464881 24.5266 0.461164 29.1822C1.38721 33.8377 3.67299 38.1141 7.02945 41.4706C10.3859 44.827 14.6623 47.1128 19.3178 48.0388C23.9734 48.9649 28.799 48.4896 33.1844 46.6731C37.5698 44.8566 41.3181 41.7805 43.9553 37.8337C46.5924 33.8869 48 29.2467 48 24.5C48 18.1348 45.4714 12.0303 40.9706 7.52944C36.4697 3.02856 30.3652 0.5 24 0.5ZM24 46.844C19.5808 46.844 15.2608 45.5335 11.5863 43.0783C7.9119 40.6232 5.04801 37.1335 3.35685 33.0507C1.66568 28.9678 1.2232 24.4752 2.08534 20.1409C2.94749 15.8066 5.07555 11.8253 8.20041 8.7004C11.3253 5.57554 15.3066 3.44748 19.6409 2.58533C23.9752 1.72319 28.4678 2.16567 32.5507 3.85684C36.6335 5.548 40.1232 8.41189 42.5784 12.0863C45.0336 15.7608 46.344 20.0808 46.344 24.5C46.3435 30.4258 43.9892 36.1088 39.799 40.299C35.6088 44.4892 29.9258 46.8435 24 46.844Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M24 40.2239C23.7805 40.2245 23.5702 40.3119 23.4151 40.467C23.2599 40.6222 23.1725 40.8325 23.172 41.0519V42.7079C23.172 42.9275 23.2592 43.1381 23.4145 43.2934C23.5698 43.4487 23.7804 43.5359 24 43.5359C24.2196 43.5359 24.4302 43.4487 24.5855 43.2934C24.7407 43.1381 24.828 42.9275 24.828 42.7079V41.0519C24.8274 40.8325 24.74 40.6222 24.5849 40.467C24.4297 40.3119 24.2194 40.2245 24 40.2239ZM28.958 40.2859C28.9004 40.0738 28.7609 39.8931 28.5702 39.7838C28.3795 39.6745 28.1531 39.6454 27.941 39.7029C27.7288 39.7605 27.5482 39.9 27.4389 40.0907C27.3295 40.2814 27.3004 40.5078 27.358 40.7199L27.788 42.3199C27.8585 42.5177 28.0013 42.6814 28.1875 42.7783C28.3737 42.8753 28.5897 42.8982 28.7922 42.8425C28.9946 42.7869 29.1685 42.6567 29.279 42.4782C29.3895 42.2997 29.4284 42.0859 29.388 41.8799L28.958 40.2859ZM16.338 38.1679C16.2435 38.113 16.139 38.0775 16.0306 38.0632C15.9222 38.049 15.8121 38.0564 15.7067 38.0851C15.6012 38.1137 15.5024 38.163 15.4161 38.2301C15.3299 38.2972 15.2577 38.3808 15.204 38.4759L14.376 39.9079C14.2783 40.097 14.2571 40.3164 14.3169 40.5207C14.3767 40.7249 14.5129 40.8983 14.6971 41.0048C14.8813 41.1114 15.0995 41.1429 15.3064 41.0928C15.5132 41.0427 15.6929 40.9149 15.808 40.7359L16.636 39.3039C16.6913 39.21 16.7274 39.1061 16.7424 38.9981C16.7573 38.8902 16.7508 38.7803 16.7231 38.6749C16.6954 38.5695 16.6471 38.4706 16.581 38.3839C16.5149 38.2973 16.4323 38.2245 16.338 38.1699V38.1679ZM32.784 38.4759C32.6689 38.2969 32.4892 38.1691 32.2824 38.1191C32.0755 38.069 31.8573 38.1005 31.6731 38.207C31.4889 38.3135 31.3527 38.4869 31.2929 38.6912C31.2331 38.8954 31.2543 39.1149 31.352 39.3039L32.18 40.7359C32.2314 40.8355 32.3025 40.9235 32.3889 40.9948C32.4754 41.066 32.5754 41.119 32.6829 41.1505C32.7904 41.1819 32.9032 41.1913 33.0145 41.1779C33.1257 41.1645 33.233 41.1287 33.33 41.0726C33.427 41.0165 33.5116 40.9414 33.5787 40.8516C33.6458 40.7619 33.694 40.6595 33.7203 40.5506C33.7467 40.4417 33.7507 40.3286 33.732 40.2182C33.7134 40.1077 33.6726 40.0022 33.612 39.9079L32.784 38.4759ZM20.03 39.7019C19.8181 39.6457 19.5926 39.6759 19.4028 39.7857C19.2131 39.8956 19.0747 40.0762 19.018 40.2879L18.588 41.8879C18.5597 41.993 18.5525 42.1026 18.5666 42.2104C18.5807 42.3183 18.6159 42.4223 18.6703 42.5166C18.7246 42.6108 18.7969 42.6935 18.8832 42.7598C18.9695 42.826 19.0679 42.8747 19.173 42.9029C19.278 42.9312 19.3876 42.9384 19.4955 42.9243C19.6034 42.9102 19.7074 42.875 19.8016 42.8206C19.8959 42.7663 19.9785 42.694 20.0448 42.6077C20.1111 42.5215 20.1597 42.423 20.188 42.3179L20.622 40.7179C20.6783 40.506 20.6485 40.2805 20.5391 40.0905C20.4296 39.9005 20.2495 39.7616 20.038 39.7039L20.03 39.7019ZM22.338 17.0499H25.648C26.3061 17.0505 26.9371 17.3121 27.4024 17.7775C27.8678 18.2428 28.1294 18.8738 28.13 19.5319C28.13 19.7515 28.2172 19.9621 28.3725 20.1174C28.5278 20.2727 28.7384 20.3599 28.958 20.3599C29.1776 20.3599 29.3882 20.2727 29.5435 20.1174C29.6987 19.9621 29.786 19.7515 29.786 19.5319C29.786 18.4345 29.35 17.382 28.574 16.6059C27.798 15.8299 26.7454 15.3939 25.648 15.3939H24.82V12.9139C24.82 12.6943 24.7327 12.4837 24.5775 12.3285C24.4222 12.1732 24.2116 12.0859 23.992 12.0859C23.7724 12.0859 23.5618 12.1732 23.4065 12.3285C23.2512 12.4837 23.164 12.6943 23.164 12.9139V15.3959H22.336C21.2385 15.3959 20.186 15.8319 19.41 16.6079C18.6339 17.384 18.198 18.4365 18.198 19.5339V21.1899C18.198 22.2874 18.6339 23.3399 19.41 24.1159C20.186 24.892 21.2385 25.3279 22.336 25.3279H25.646C26.3041 25.3285 26.9351 25.5901 27.4004 26.0555C27.8658 26.5208 28.1274 27.1518 28.128 27.8099V29.4659C28.1274 30.124 27.8658 30.755 27.4004 31.2204C26.9351 31.6857 26.3041 31.9474 25.646 31.9479H24.818V26.9819C24.818 26.7623 24.7307 26.5517 24.5755 26.3965C24.4202 26.2412 24.2096 26.1539 23.99 26.1539C23.7704 26.1539 23.5598 26.2412 23.4045 26.3965C23.2492 26.5517 23.162 26.7623 23.162 26.9819V31.9479H22.334C21.6759 31.9474 21.0449 31.6857 20.5795 31.2204C20.1142 30.755 19.8525 30.124 19.852 29.4659C19.852 29.2463 19.7647 29.0357 19.6095 28.8804C19.4542 28.7252 19.2436 28.6379 19.024 28.6379C18.8044 28.6379 18.5938 28.7252 18.4385 28.8804C18.2832 29.0357 18.196 29.2463 18.196 29.4659C18.196 30.5634 18.6319 31.6159 19.408 32.3919C20.184 33.168 21.2365 33.6039 22.334 33.6039H23.162V36.0859C23.162 36.3055 23.2492 36.5161 23.4045 36.6714C23.5598 36.8267 23.7704 36.9139 23.99 36.9139C24.2096 36.9139 24.4202 36.8267 24.5755 36.6714C24.7307 36.5161 24.818 36.3055 24.818 36.0859V33.6039H25.646C26.7434 33.6039 27.796 33.168 28.572 32.3919C29.348 31.6159 29.784 30.5634 29.784 29.4659V27.8099C29.784 26.7125 29.348 25.66 28.572 24.8839C27.796 24.1079 26.7434 23.6719 25.646 23.6719H24.818V18.7059C24.818 18.4863 24.7307 18.2757 24.5755 18.1205C24.4202 17.9652 24.2096 17.8779 23.99 17.8779C23.7704 17.8779 23.5598 17.9652 23.4045 18.1205C23.2492 18.2757 23.162 18.4863 23.162 18.7059V23.6719H22.334C21.6759 23.6714 21.0449 23.4097 20.5795 22.9444C20.1142 22.479 19.8525 21.848 19.852 21.1899V19.5339C19.8522 19.2071 19.917 18.8834 20.0426 18.5816C20.1682 18.2799 20.3521 18.0058 20.5838 17.7752C20.8155 17.5447 21.0904 17.3621 21.3928 17.238C21.6952 17.1138 22.0191 17.0506 22.346 17.0519L22.338 17.0499Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M11.71 12.2099C13.6587 10.2705 16.038 8.81892 18.654 7.97332C21.27 7.12772 24.0488 6.91207 26.764 7.34394C26.8727 7.3614 26.9838 7.35728 27.091 7.33181C27.1981 7.30633 27.2992 7.26 27.3884 7.19547C27.4776 7.13093 27.5533 7.04945 27.611 6.95568C27.6688 6.8619 27.7075 6.75767 27.725 6.64894C27.7424 6.5402 27.7383 6.42909 27.7128 6.32195C27.6874 6.21481 27.641 6.11374 27.5765 6.0245C27.512 5.93526 27.4305 5.85961 27.3367 5.80186C27.2429 5.74411 27.1387 5.7054 27.03 5.68794C23.0525 5.04153 18.9724 5.67402 15.3773 7.49435C11.7822 9.31469 8.85744 12.2289 7.02424 15.8175C5.19104 19.4061 4.54393 23.4839 5.17608 27.4637C5.80823 31.4435 7.68704 35.12 10.542 37.9639C10.7002 38.1011 10.9045 38.1732 11.1138 38.1657C11.3231 38.1583 11.5217 38.0718 11.6698 37.9238C11.8179 37.7757 11.9043 37.577 11.9118 37.3677C11.9192 37.1585 11.8471 36.9542 11.71 36.7959C10.0953 35.1818 8.81442 33.2654 7.94053 31.1561C7.06663 29.0468 6.61684 26.7861 6.61684 24.5029C6.61684 22.2198 7.06663 19.959 7.94053 17.8498C8.81442 15.7405 10.0953 13.8241 11.71 12.2099ZM37.458 11.0419C36.9116 10.4949 36.334 9.98007 35.728 9.49994C35.6147 9.39777 35.4755 9.32864 35.3256 9.30008C35.1758 9.27151 35.0209 9.28461 34.878 9.33794C34.7353 9.39119 34.6102 9.48284 34.5163 9.60276C34.4225 9.72268 34.3636 9.86621 34.3462 10.0175C34.3288 10.1688 34.3536 10.3219 34.4178 10.46C34.482 10.5981 34.5831 10.7157 34.71 10.7999C35.2627 11.2363 35.7902 11.7037 36.29 12.1999C39.5488 15.4602 41.3795 19.8812 41.3795 24.4909C41.3795 29.1006 39.5488 33.5217 36.29 36.7819C36.1739 36.881 36.0875 37.0101 36.0402 37.1552C35.9929 37.3002 35.9866 37.4555 36.022 37.6039C36.0579 37.7523 36.1341 37.888 36.2421 37.9959C36.3501 38.1038 36.4858 38.1799 36.6343 38.2156C36.7827 38.2514 36.9382 38.2455 37.0835 38.1986C37.2288 38.1518 37.3584 38.0657 37.458 37.9499C41.023 34.38 43.0254 29.5411 43.0254 24.4959C43.0254 19.4508 41.023 14.6119 37.458 11.0419Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M13.654 22.844L14.678 24.716L16.55 25.74L14.678 26.764L13.654 28.636L12.63 26.764L10.758 25.74L12.63 24.716L13.654 22.844ZM34.28 15.396L34.982 16.686L36.282 17.4L34.982 18.102L34.28 19.402L33.566 18.102L32.276 17.396L33.566 16.682L34.28 15.396ZM34.222 28.396L34.71 29.282L35.586 29.764L34.71 30.252L34.222 31.128L33.74 30.252L32.854 29.764L33.74 29.282L34.222 28.396Z",fill:"#FFF8F8"})),cy=e=>le.createElement("svg",{width:48,height:46,viewBox:"0 0 48 46",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},le.createElement("path",{d:"M6 43.3579V1.35786L9.42857 3.92929L12.8571 1.35786L16.2857 3.92929L19.7143 1.35786L23.1429 3.92929L26.5714 1.35786L30 3.92929L33.4286 1.35786L36.8571 3.92929L40.2857 1.35786L42 3.07215V43.3579H6Z",fill:"#FAEFDE"}),le.createElement("path",{d:"M44.5714 39.0721H42H5.99997H3.42855C2.00826 39.0721 0.857117 40.2233 0.857117 41.6436C0.857117 43.0639 2.00826 44.215 3.42855 44.215H44.5714C45.9917 44.215 47.1428 43.0639 47.1428 41.6436C47.1428 40.2233 45.9917 39.0721 44.5714 39.0721Z",fill:"#7E8189"}),le.createElement("path",{d:"M6 36.5007H42V44.215H6V36.5007Z",fill:"#EFD8BE"}),le.createElement("path",{d:"M44.5714 38.215H42.8571V3.07215C42.8571 2.84501 42.7671 2.62644 42.606 2.46615L40.8917 0.751868C40.59 0.450154 40.1126 0.415867 39.7714 0.672153L36.8571 2.85787L33.9437 0.672153C33.6394 0.443296 33.2194 0.443296 32.9151 0.672153L30 2.85787L27.0857 0.672153C26.7814 0.442439 26.3614 0.443296 26.0571 0.672153L23.1429 2.85787L20.2286 0.672153C19.9243 0.443296 19.5043 0.443296 19.2 0.672153L16.2857 2.85787L13.3714 0.672153C13.0671 0.443296 12.6471 0.443296 12.3429 0.672153L9.42857 2.85787L6.51429 0.672153C6.25457 0.476725 5.90657 0.44501 5.61686 0.590724C5.32629 0.736439 5.14286 1.03301 5.14286 1.35787V38.215H3.42857C1.53771 38.215 0 39.7527 0 41.6436C0 43.5344 1.53771 45.0722 3.42857 45.0722H44.5714C46.4623 45.0722 48 43.5344 48 41.6436C48 39.7527 46.4623 38.215 44.5714 38.215ZM3.42857 43.3579C2.48314 43.3579 1.71429 42.589 1.71429 41.6436C1.71429 40.6982 2.48314 39.9293 3.42857 39.9293H5.14286V43.3579H3.42857ZM6.85714 43.3579V39.0739V39.0722V39.0704V38.215C7.33029 38.215 7.71429 37.831 7.71429 37.3579V35.6436C7.71429 35.1704 7.33029 34.7864 6.85714 34.7864V3.07215L8.91429 4.61501C9.21857 4.84387 9.63857 4.84387 9.94286 4.61501L12.8571 2.4293L15.7714 4.61501C16.0757 4.84387 16.4957 4.84387 16.8 4.61501L19.7143 2.4293L22.6286 4.61501C22.9329 4.84472 23.3529 4.84387 23.6571 4.61501L26.5714 2.4293L29.4857 4.61501C29.79 4.84472 30.21 4.84387 30.5143 4.61501L33.4286 2.4293L36.3429 4.61501C36.6471 4.84387 37.0671 4.84387 37.3714 4.61501L40.2051 2.49015L41.1429 3.42701V34.7864C40.6697 34.7864 40.2857 35.1704 40.2857 35.6436V37.3579C40.2857 37.831 40.6697 38.215 41.1429 38.215V43.3579H6.85714ZM44.5714 43.3579H42.8571V39.9293H44.5714C45.5169 39.9293 46.2857 40.6982 46.2857 41.6436C46.2857 42.589 45.5169 43.3579 44.5714 43.3579Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M11.1428 34.7864C10.6697 34.7864 10.2857 35.1704 10.2857 35.6436V37.3579C10.2857 37.831 10.6697 38.215 11.1428 38.215C11.616 38.215 12 37.831 12 37.3579V35.6436C12 35.1704 11.616 34.7864 11.1428 34.7864ZM15.4286 34.7864C14.9554 34.7864 14.5714 35.1704 14.5714 35.6436V37.3579C14.5714 37.831 14.9554 38.215 15.4286 38.215C15.9017 38.215 16.2857 37.831 16.2857 37.3579V35.6436C16.2857 35.1704 15.9017 34.7864 15.4286 34.7864ZM19.7143 34.7864C19.2411 34.7864 18.8571 35.1704 18.8571 35.6436V37.3579C18.8571 37.831 19.2411 38.215 19.7143 38.215C20.1874 38.215 20.5714 37.831 20.5714 37.3579V35.6436C20.5714 35.1704 20.1874 34.7864 19.7143 34.7864ZM24 34.7864C23.5268 34.7864 23.1428 35.1704 23.1428 35.6436V37.3579C23.1428 37.831 23.5268 38.215 24 38.215C24.4731 38.215 24.8571 37.831 24.8571 37.3579V35.6436C24.8571 35.1704 24.4731 34.7864 24 34.7864ZM28.2857 34.7864C27.8126 34.7864 27.4286 35.1704 27.4286 35.6436V37.3579C27.4286 37.831 27.8126 38.215 28.2857 38.215C28.7588 38.215 29.1428 37.831 29.1428 37.3579V35.6436C29.1428 35.1704 28.7588 34.7864 28.2857 34.7864ZM32.5714 34.7864C32.0983 34.7864 31.7143 35.1704 31.7143 35.6436V37.3579C31.7143 37.831 32.0983 38.215 32.5714 38.215C33.0446 38.215 33.4286 37.831 33.4286 37.3579V35.6436C33.4286 35.1704 33.0446 34.7864 32.5714 34.7864ZM36.8571 34.7864C36.384 34.7864 36 35.1704 36 35.6436V37.3579C36 37.831 36.384 38.215 36.8571 38.215C37.3303 38.215 37.7143 37.831 37.7143 37.3579V35.6436C37.7143 35.1704 37.3303 34.7864 36.8571 34.7864Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M30 10.7864H35.1429C35.616 10.7864 36 10.4024 36 9.92929C36 9.45614 35.616 9.07214 35.1429 9.07214H30C29.5269 9.07214 29.1429 9.45614 29.1429 9.92929C29.1429 10.4024 29.5269 10.7864 30 10.7864ZM26.5714 9.07214H12.8571C12.384 9.07214 12 9.45614 12 9.92929C12 10.4024 12.384 10.7864 12.8571 10.7864H26.5714C27.0446 10.7864 27.4286 10.4024 27.4286 9.92929C27.4286 9.45614 27.0446 9.07214 26.5714 9.07214ZM12.8571 14.215H22.2857C22.7589 14.215 23.1429 13.831 23.1429 13.3579C23.1429 12.8847 22.7589 12.5007 22.2857 12.5007H12.8571C12.384 12.5007 12 12.8847 12 13.3579C12 13.831 12.384 14.215 12.8571 14.215ZM12.8571 21.0721H21.4286C21.9017 21.0721 22.2857 20.6881 22.2857 20.215C22.2857 19.7419 21.9017 19.3579 21.4286 19.3579H12.8571C12.384 19.3579 12 19.7419 12 20.215C12 20.6881 12.384 21.0721 12.8571 21.0721Z",fill:"#A5BAC6"}),le.createElement("path",{d:"M21.4286 26.215H19.7143C19.2411 26.215 18.8571 26.599 18.8571 27.0722C18.8571 27.5453 19.2411 27.9293 19.7143 27.9293H21.4286C21.9017 27.9293 22.2857 27.5453 22.2857 27.0722C22.2857 26.599 21.9017 26.215 21.4286 26.215ZM16.2857 26.215H12.8571C12.384 26.215 12 26.599 12 27.0722C12 27.5453 12.384 27.9293 12.8571 27.9293H16.2857C16.7589 27.9293 17.1429 27.5453 17.1429 27.0722C17.1429 26.599 16.7589 26.215 16.2857 26.215ZM24 22.7864H12.8571C12.384 22.7864 12 23.1704 12 23.6436C12 24.1167 12.384 24.5007 12.8571 24.5007H24C24.4731 24.5007 24.8571 24.1167 24.8571 23.6436C24.8571 23.1704 24.4731 22.7864 24 22.7864Z",fill:"#EB9697"}),le.createElement("path",{d:"M36 24.5007C36 23.083 34.8463 21.9293 33.4286 21.9293H31.7143C31.242 21.9293 30.8572 21.5444 30.8572 21.0722V18.5007C30.8572 18.0284 31.242 17.6436 31.7143 17.6436H33.4286C33.9009 17.6436 34.2857 18.0284 34.2857 18.5007V19.3579C34.2857 19.831 34.6697 20.215 35.1429 20.215C35.616 20.215 36 19.831 36 19.3579V18.5007C36 17.083 34.8463 15.9293 33.4286 15.9293V15.0722C33.4286 14.599 33.0446 14.215 32.5715 14.215C32.0983 14.215 31.7143 14.599 31.7143 15.0722V15.9293C30.2966 15.9293 29.1429 17.083 29.1429 18.5007V21.0722C29.1429 22.4899 30.2966 23.6436 31.7143 23.6436H33.4286C33.9009 23.6436 34.2857 24.0284 34.2857 24.5007V27.0722C34.2857 27.5444 33.9009 27.9293 33.4286 27.9293H31.7143C31.242 27.9293 30.8572 27.5444 30.8572 27.0722V26.215C30.8572 25.7419 30.4732 25.3579 30 25.3579C29.5269 25.3579 29.1429 25.7419 29.1429 26.215V27.0722C29.1429 28.4899 30.2966 29.6436 31.7143 29.6436V30.5007C31.7143 30.9739 32.0983 31.3579 32.5715 31.3579C33.0446 31.3579 33.4286 30.9739 33.4286 30.5007V29.6436C34.8463 29.6436 36 28.4899 36 27.0722V24.5007Z",fill:"#98C77C"})),dy=e=>le.createElement("svg",{width:48,height:49,viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},le.createElement("path",{d:"M44.2069 35.2586C44.2069 35.2586 42.5517 39.3965 32.6207 39.3965C24.3448 39.3965 21.0345 34.431 21.0345 34.431V5.46551C21.0345 5.46551 22.2759 2.15517 32.4138 2.15517C42.5517 2.15517 44.2069 5.46551 44.2069 5.46551V35.2586Z",fill:"#FFEB9B"}),le.createElement("path",{d:"M26 43.5345C26 43.5345 22.6896 46.8448 14.4138 46.8448C6.13792 46.8448 2.82758 43.5345 2.82758 43.5345V17.8793C2.82758 17.8793 4.06895 14.569 14.2069 14.569C24.3448 14.569 26 17.8793 26 17.8793V43.5345Z",fill:"#FFEB9B"}),le.createElement("path",{d:"M26 43.5345C26 43.5345 21.862 47.6724 16.8965 47.6724C10.2758 47.6724 8.62067 46.8448 8.62067 46.8448V22.0172C8.62067 22.0172 11.931 22.8448 16.8965 22.8448C22.6896 22.8448 26 19.5345 26 18.7069C26 17.8793 26 43.5345 26 43.5345ZM44.2069 35.2586C44.2069 35.2586 40.0689 39.3965 35.1034 39.3965C28.4827 39.3965 26.8276 38.569 26.8276 38.569V8.77586C26.8276 8.77586 30.1379 9.60345 35.1034 9.60345C41.7241 9.60345 44.2069 5.46552 44.2069 5.46552V35.2586Z",fill:"#F9DD8F"}),le.createElement("path",{d:"M18.5518 22.7199V47.5185C22.7476 46.7786 26 43.5345 26 43.5345C26 43.5345 26 16.2241 26 17.8793C26 19.5345 23.3112 22.0495 18.5518 22.7199ZM36.7587 9.47849V39.2426C40.9545 38.5028 44.2069 35.2586 44.2069 35.2586V4.63794C44.2069 4.63794 43.3793 8.77587 36.7587 9.47849Z",fill:"#EFC88E"}),le.createElement("path",{d:"M20.2069 5.46552H21.8621V16.0859H20.2069V5.46552Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M32.6207 10.431C26.1233 10.431 20.2069 8.06497 20.2069 5.46552C20.2069 2.86607 26.1233 0.5 32.6207 0.5C39.1181 0.5 45.0345 2.86607 45.0345 5.46552C45.0345 5.92317 44.6646 6.2931 44.2069 6.2931C43.7493 6.2931 43.3793 5.92317 43.3793 5.46552C43.3793 4.51131 39.0916 2.15517 32.6207 2.15517C26.1498 2.15517 21.8621 4.51131 21.8621 5.46552C21.8621 6.41972 26.1498 8.77586 32.6207 8.77586C33.0784 8.77586 33.4483 9.14579 33.4483 9.60345C33.4483 10.0611 33.0784 10.431 32.6207 10.431Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M35.9583 10.2192C35.5479 10.2192 35.1912 9.91461 35.1382 9.49668C35.0811 9.04316 35.4006 8.62854 35.8541 8.57061C36.9639 8.42909 38.0273 8.21723 39.0146 7.94082C39.4508 7.81999 39.9117 8.07406 40.0342 8.51433C40.1575 8.95461 39.901 9.41144 39.4607 9.53392C38.3956 9.83185 37.2527 10.0603 36.0643 10.2117C36.0287 10.2167 35.9931 10.2192 35.9583 10.2192ZM14.4138 23.6724C7.91641 23.6724 2 21.3063 2 18.7069C2 16.1074 7.91641 13.7414 14.4138 13.7414C20.9112 13.7414 26.8276 16.1074 26.8276 18.7069C26.8276 19.1645 26.4577 19.5345 26 19.5345C25.5423 19.5345 25.1724 19.1645 25.1724 18.7069C25.1724 17.7527 20.8847 15.3965 14.4138 15.3965C7.9429 15.3965 3.65517 17.7527 3.65517 18.7069C3.65517 19.6611 7.9429 22.0172 14.4138 22.0172C14.8714 22.0172 15.2414 22.3872 15.2414 22.8448C15.2414 23.3025 14.8714 23.6724 14.4138 23.6724Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M17.8317 23.4506C17.4221 23.4506 17.0662 23.1477 17.0124 22.7306C16.9528 22.2779 17.2714 21.8616 17.725 21.8029C18.8083 21.6605 19.8477 21.4512 20.8143 21.1805C21.2497 21.0589 21.7114 21.3138 21.8339 21.7541C21.9572 22.1943 21.7007 22.6512 21.2604 22.7736C20.2177 23.0658 19.1012 23.2909 17.9393 23.4432C17.9037 23.4481 17.8673 23.4506 17.8317 23.4506ZM14.4138 28.6379C7.91641 28.6379 2 26.2719 2 23.6724H3.65517C3.65517 24.6266 7.9429 26.9828 14.4138 26.9828C20.8847 26.9828 25.1724 24.6266 25.1724 23.6724H26.8276C26.8276 26.2719 20.9112 28.6379 14.4138 28.6379ZM14.4138 38.569C7.91641 38.569 2 36.2029 2 33.6034H3.65517C3.65517 34.5576 7.9429 36.9138 14.4138 36.9138C20.8847 36.9138 25.1724 34.5576 25.1724 33.6034H26.8276C26.8276 36.2029 20.9112 38.569 14.4138 38.569ZM14.4138 33.6034C7.91641 33.6034 2 31.2374 2 28.6379H3.65517C3.65517 29.5921 7.9429 31.9483 14.4138 31.9483C20.8847 31.9483 25.1724 29.5921 25.1724 28.6379H26.8276C26.8276 31.2374 20.9112 33.6034 14.4138 33.6034ZM14.4138 43.5345C7.91641 43.5345 2 41.1684 2 38.569H3.65517C3.65517 39.5232 7.9429 41.8793 14.4138 41.8793C20.8847 41.8793 25.1724 39.5232 25.1724 38.569H26.8276C26.8276 41.1684 20.9112 43.5345 14.4138 43.5345ZM32.6207 15.3965C26.1233 15.3965 20.2069 13.0305 20.2069 10.431H21.8621C21.8621 11.3852 26.1498 13.7414 32.6207 13.7414C39.0916 13.7414 43.3793 11.3852 43.3793 10.431H45.0345C45.0345 13.0305 39.1181 15.3965 32.6207 15.3965ZM32.6207 20.3621C30.2662 20.3621 27.92 20.0575 25.8378 19.4823L26.2789 17.8868C28.2204 18.423 30.4127 18.7069 32.6207 18.7069C39.0916 18.7069 43.3793 16.3508 43.3793 15.3965H45.0345C45.0345 17.996 39.1181 20.3621 32.6207 20.3621Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M32.6207 25.3276C30.2513 25.3276 27.8935 25.0197 25.8022 24.4371L26.2466 22.8432C28.1947 23.3852 30.3986 23.6724 32.6207 23.6724C39.0916 23.6724 43.3793 21.3163 43.3793 20.3621H45.0345C45.0345 22.9615 39.118 25.3276 32.6207 25.3276ZM32.6207 30.2931C30.2496 30.2931 27.8902 29.9844 25.7972 29.401L26.2416 27.807C28.1914 28.3499 30.3969 28.6379 32.6207 28.6379C39.0916 28.6379 43.3793 26.2818 43.3793 25.3276H45.0345C45.0345 27.927 39.118 30.2931 32.6207 30.2931ZM32.6207 35.2586C30.2438 35.2586 27.8778 34.9483 25.7773 34.3615L26.2234 32.7676C28.1798 33.3138 30.392 33.6034 32.6207 33.6034C39.0916 33.6034 43.3793 31.2473 43.3793 30.2931H45.0345C45.0345 32.8925 39.118 35.2586 32.6207 35.2586Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M32.6207 40.2241C30.2513 40.2241 27.8935 39.9163 25.8022 39.3336L26.2466 37.7397C28.1947 38.2818 30.3986 38.569 32.6207 38.569C39.0916 38.569 43.3793 36.2128 43.3793 35.2586V5.46552H45.0345V35.2586C45.0345 37.8581 39.118 40.2241 32.6207 40.2241Z",fill:"#8D6C9F"}),le.createElement("path",{d:"M14.4138 48.5C7.91641 48.5 2 46.1339 2 43.5345V18.7069H3.65517V43.5345C3.65517 44.4887 7.9429 46.8448 14.4138 46.8448C20.8847 46.8448 25.1724 44.4887 25.1724 43.5345V18.7069H26.8276V43.5345C26.8276 46.1339 20.9112 48.5 14.4138 48.5ZM17.7241 2.98275H16.069C15.6113 2.98275 15.2414 2.61282 15.2414 2.15516C15.2414 1.69751 15.6113 1.32758 16.069 1.32758H17.7241C18.1818 1.32758 18.5517 1.69751 18.5517 2.15516C18.5517 2.61282 18.1818 2.98275 17.7241 2.98275ZM17.7241 7.12068H16.069C15.6113 7.12068 15.2414 6.75075 15.2414 6.29309C15.2414 5.83544 15.6113 5.46551 16.069 5.46551H17.7241C18.1818 5.46551 18.5517 5.83544 18.5517 6.29309C18.5517 6.75075 18.1818 7.12068 17.7241 7.12068ZM17.7241 11.2586H16.069C15.6113 11.2586 15.2414 10.8887 15.2414 10.431C15.2414 9.97337 15.6113 9.60344 16.069 9.60344H17.7241C18.1818 9.60344 18.5517 9.97337 18.5517 10.431C18.5517 10.8887 18.1818 11.2586 17.7241 11.2586Z",fill:"#8D6C9F"})),Fn=t.appLocale.getLocalizedStrings().cockpit.portfolio,ia=({totalCashBalance:e,totalExpenses:n,totalRevenues:r,companyNameSticky:i})=>o.jsxRuntimeExports.jsxs(py,{companyNameSticky:i,children:[o.jsxRuntimeExports.jsxs(Bn,{children:[o.jsxRuntimeExports.jsx(Yt,{children:o.jsxRuntimeExports.jsx(ly,{})}),o.jsxRuntimeExports.jsxs(Yt,{children:[o.jsxRuntimeExports.jsx(Wn,{textColor:t.getCockpitColor("cashBalance"),children:t.amountToString("0,0",e)}),o.jsxRuntimeExports.jsx(_n,{children:Fn.cashUnderManagementText})]})]}),o.jsxRuntimeExports.jsxs(Bn,{children:[o.jsxRuntimeExports.jsx(Yt,{children:o.jsxRuntimeExports.jsx(cy,{})}),o.jsxRuntimeExports.jsxs(Yt,{children:[o.jsxRuntimeExports.jsx(Wn,{textColor:t.getCockpitColor("expenses"),children:t.amountToString("0,0",n)}),o.jsxRuntimeExports.jsx(_n,{children:Fn.expensesAcrossAllCustomersText})]})]}),o.jsxRuntimeExports.jsxs(Bn,{children:[o.jsxRuntimeExports.jsx(Yt,{children:o.jsxRuntimeExports.jsx(dy,{})}),o.jsxRuntimeExports.jsxs(Yt,{children:[o.jsxRuntimeExports.jsx(Wn,{textColor:t.getCockpitColor("revenues"),children:t.amountToString("0,0",r)}),o.jsxRuntimeExports.jsx(_n,{children:Fn.revenuesAcrossAllCustomersText})]})]})]}),py=s.div`
|
|
2888
|
+
`,ly=e=>ae.createElement("svg",{width:48,height:49,viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ae.createElement("path",{d:"M23.994 6.29199C20.3944 6.29199 16.8756 7.3594 13.8826 9.35924C10.8897 11.3591 8.55692 14.2015 7.17941 17.5271C5.80189 20.8528 5.44147 24.5122 6.14372 28.0426C6.84597 31.5731 8.57935 34.816 11.1247 37.3613C13.67 39.9066 16.9129 41.64 20.4434 42.3423C23.9738 43.0445 27.6332 42.6841 30.9588 41.3066C34.2845 39.9291 37.1269 37.5963 39.1268 34.6034C41.1266 31.6104 42.194 28.0916 42.194 24.492C42.194 22.1019 41.7232 19.7353 40.8086 17.5271C39.894 15.319 38.5534 13.3127 36.8633 11.6226C35.1733 9.93262 33.167 8.59202 30.9588 7.67738C28.7507 6.76275 26.3841 6.29199 23.994 6.29199Z",fill:"#F9E3AE"}),ae.createElement("path",{d:"M8.86603 42.1201C11.0593 44.2078 13.6416 45.8442 16.466 46.9361L44.69 18.7081V13.3861C43.8158 11.9373 42.7857 10.5886 41.618 9.36406L8.86603 42.1201ZM7.25203 40.4221L39.726 7.94806H34.76L5.14803 37.5601C5.77565 38.5661 6.47902 39.5229 7.25203 40.4221ZM4.79203 34.6061L32.276 7.12206L29.794 5.46606L3.60803 31.6521C3.93426 32.6628 4.32987 33.6498 4.79203 34.6061Z",fill:"#FFEFCA"}),ae.createElement("path",{d:"M24 1.32788C19.417 1.32788 14.937 2.68689 11.1263 5.23307C7.31572 7.77924 4.34571 11.3982 2.59188 15.6323C0.838043 19.8665 0.37916 24.5256 1.27326 29.0205C2.16735 33.5154 4.37427 37.6443 7.61493 40.885C10.8556 44.1256 14.9845 46.3325 19.4794 47.2266C23.9743 48.1207 28.6334 47.6618 32.8675 45.908C37.1017 44.1542 40.7206 41.1842 43.2668 37.3735C45.813 33.5629 47.172 29.0829 47.172 24.4999C47.172 18.3543 44.7307 12.4604 40.3851 8.1148C36.0395 3.76921 30.1456 1.32788 24 1.32788ZM24 42.7079C21.0282 42.7036 18.1025 41.9717 15.4788 40.576C12.855 39.1803 10.613 37.1634 8.9485 34.7014C7.28402 32.2394 6.24775 29.4072 5.93024 26.4524C5.61273 23.4975 6.02363 20.5099 7.12705 17.7504C8.23047 14.991 9.99283 12.5438 12.2602 10.6225C14.5275 8.70128 17.2308 7.36449 20.1339 6.72895C23.037 6.0934 26.0516 6.17844 28.9143 6.97663C31.7769 7.77482 34.4006 9.26187 36.556 11.3079L37.118 11.8599C37.3313 12.0825 37.538 12.3085 37.738 12.5379C40.0344 15.1727 41.5236 18.4131 42.0276 21.8717C42.5315 25.3304 42.0289 28.861 40.5798 32.0416C39.1307 35.2222 36.7965 37.9183 33.856 39.8076C30.9155 41.697 27.4932 42.6997 23.998 42.6959L24 42.7079Z",fill:"#F6D397"}),ae.createElement("path",{d:"M32.192 9.06799C32.3774 9.06725 32.5571 9.00433 32.7025 8.8893C32.8479 8.77426 32.9504 8.61378 32.9937 8.43354C33.0371 8.25331 33.0187 8.06374 32.9415 7.89521C32.8643 7.72667 32.7328 7.58891 32.568 7.50399C31.9491 7.19298 31.3135 6.91655 30.664 6.67599C30.4615 6.60992 30.2413 6.62464 30.0494 6.71706C29.8575 6.80949 29.7087 6.97247 29.6341 7.17199C29.5595 7.37151 29.5649 7.59213 29.6491 7.78779C29.7333 7.98345 29.8898 8.13901 30.086 8.22199C30.6776 8.44532 31.2571 8.69967 31.822 8.98399C31.9377 9.03856 32.064 9.06723 32.192 9.06799Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M24 0.5C19.2533 0.5 14.6131 1.90758 10.6663 4.54473C6.71954 7.18188 3.6434 10.9302 1.8269 15.3156C0.0103989 19.701 -0.464881 24.5266 0.461164 29.1822C1.38721 33.8377 3.67299 38.1141 7.02945 41.4706C10.3859 44.827 14.6623 47.1128 19.3178 48.0388C23.9734 48.9649 28.799 48.4896 33.1844 46.6731C37.5698 44.8566 41.3181 41.7805 43.9553 37.8337C46.5924 33.8869 48 29.2467 48 24.5C48 18.1348 45.4714 12.0303 40.9706 7.52944C36.4697 3.02856 30.3652 0.5 24 0.5ZM24 46.844C19.5808 46.844 15.2608 45.5335 11.5863 43.0783C7.9119 40.6232 5.04801 37.1335 3.35685 33.0507C1.66568 28.9678 1.2232 24.4752 2.08534 20.1409C2.94749 15.8066 5.07555 11.8253 8.20041 8.7004C11.3253 5.57554 15.3066 3.44748 19.6409 2.58533C23.9752 1.72319 28.4678 2.16567 32.5507 3.85684C36.6335 5.548 40.1232 8.41189 42.5784 12.0863C45.0336 15.7608 46.344 20.0808 46.344 24.5C46.3435 30.4258 43.9892 36.1088 39.799 40.299C35.6088 44.4892 29.9258 46.8435 24 46.844Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M24 40.2239C23.7805 40.2245 23.5702 40.3119 23.4151 40.467C23.2599 40.6222 23.1725 40.8325 23.172 41.0519V42.7079C23.172 42.9275 23.2592 43.1381 23.4145 43.2934C23.5698 43.4487 23.7804 43.5359 24 43.5359C24.2196 43.5359 24.4302 43.4487 24.5855 43.2934C24.7407 43.1381 24.828 42.9275 24.828 42.7079V41.0519C24.8274 40.8325 24.74 40.6222 24.5849 40.467C24.4297 40.3119 24.2194 40.2245 24 40.2239ZM28.958 40.2859C28.9004 40.0738 28.7609 39.8931 28.5702 39.7838C28.3795 39.6745 28.1531 39.6454 27.941 39.7029C27.7288 39.7605 27.5482 39.9 27.4389 40.0907C27.3295 40.2814 27.3004 40.5078 27.358 40.7199L27.788 42.3199C27.8585 42.5177 28.0013 42.6814 28.1875 42.7783C28.3737 42.8753 28.5897 42.8982 28.7922 42.8425C28.9946 42.7869 29.1685 42.6567 29.279 42.4782C29.3895 42.2997 29.4284 42.0859 29.388 41.8799L28.958 40.2859ZM16.338 38.1679C16.2435 38.113 16.139 38.0775 16.0306 38.0632C15.9222 38.049 15.8121 38.0564 15.7067 38.0851C15.6012 38.1137 15.5024 38.163 15.4161 38.2301C15.3299 38.2972 15.2577 38.3808 15.204 38.4759L14.376 39.9079C14.2783 40.097 14.2571 40.3164 14.3169 40.5207C14.3767 40.7249 14.5129 40.8983 14.6971 41.0048C14.8813 41.1114 15.0995 41.1429 15.3064 41.0928C15.5132 41.0427 15.6929 40.9149 15.808 40.7359L16.636 39.3039C16.6913 39.21 16.7274 39.1061 16.7424 38.9981C16.7573 38.8902 16.7508 38.7803 16.7231 38.6749C16.6954 38.5695 16.6471 38.4706 16.581 38.3839C16.5149 38.2973 16.4323 38.2245 16.338 38.1699V38.1679ZM32.784 38.4759C32.6689 38.2969 32.4892 38.1691 32.2824 38.1191C32.0755 38.069 31.8573 38.1005 31.6731 38.207C31.4889 38.3135 31.3527 38.4869 31.2929 38.6912C31.2331 38.8954 31.2543 39.1149 31.352 39.3039L32.18 40.7359C32.2314 40.8355 32.3025 40.9235 32.3889 40.9948C32.4754 41.066 32.5754 41.119 32.6829 41.1505C32.7904 41.1819 32.9032 41.1913 33.0145 41.1779C33.1257 41.1645 33.233 41.1287 33.33 41.0726C33.427 41.0165 33.5116 40.9414 33.5787 40.8516C33.6458 40.7619 33.694 40.6595 33.7203 40.5506C33.7467 40.4417 33.7507 40.3286 33.732 40.2182C33.7134 40.1077 33.6726 40.0022 33.612 39.9079L32.784 38.4759ZM20.03 39.7019C19.8181 39.6457 19.5926 39.6759 19.4028 39.7857C19.2131 39.8956 19.0747 40.0762 19.018 40.2879L18.588 41.8879C18.5597 41.993 18.5525 42.1026 18.5666 42.2104C18.5807 42.3183 18.6159 42.4223 18.6703 42.5166C18.7246 42.6108 18.7969 42.6935 18.8832 42.7598C18.9695 42.826 19.0679 42.8747 19.173 42.9029C19.278 42.9312 19.3876 42.9384 19.4955 42.9243C19.6034 42.9102 19.7074 42.875 19.8016 42.8206C19.8959 42.7663 19.9785 42.694 20.0448 42.6077C20.1111 42.5215 20.1597 42.423 20.188 42.3179L20.622 40.7179C20.6783 40.506 20.6485 40.2805 20.5391 40.0905C20.4296 39.9005 20.2495 39.7616 20.038 39.7039L20.03 39.7019ZM22.338 17.0499H25.648C26.3061 17.0505 26.9371 17.3121 27.4024 17.7775C27.8678 18.2428 28.1294 18.8738 28.13 19.5319C28.13 19.7515 28.2172 19.9621 28.3725 20.1174C28.5278 20.2727 28.7384 20.3599 28.958 20.3599C29.1776 20.3599 29.3882 20.2727 29.5435 20.1174C29.6987 19.9621 29.786 19.7515 29.786 19.5319C29.786 18.4345 29.35 17.382 28.574 16.6059C27.798 15.8299 26.7454 15.3939 25.648 15.3939H24.82V12.9139C24.82 12.6943 24.7327 12.4837 24.5775 12.3285C24.4222 12.1732 24.2116 12.0859 23.992 12.0859C23.7724 12.0859 23.5618 12.1732 23.4065 12.3285C23.2512 12.4837 23.164 12.6943 23.164 12.9139V15.3959H22.336C21.2385 15.3959 20.186 15.8319 19.41 16.6079C18.6339 17.384 18.198 18.4365 18.198 19.5339V21.1899C18.198 22.2874 18.6339 23.3399 19.41 24.1159C20.186 24.892 21.2385 25.3279 22.336 25.3279H25.646C26.3041 25.3285 26.9351 25.5901 27.4004 26.0555C27.8658 26.5208 28.1274 27.1518 28.128 27.8099V29.4659C28.1274 30.124 27.8658 30.755 27.4004 31.2204C26.9351 31.6857 26.3041 31.9474 25.646 31.9479H24.818V26.9819C24.818 26.7623 24.7307 26.5517 24.5755 26.3965C24.4202 26.2412 24.2096 26.1539 23.99 26.1539C23.7704 26.1539 23.5598 26.2412 23.4045 26.3965C23.2492 26.5517 23.162 26.7623 23.162 26.9819V31.9479H22.334C21.6759 31.9474 21.0449 31.6857 20.5795 31.2204C20.1142 30.755 19.8525 30.124 19.852 29.4659C19.852 29.2463 19.7647 29.0357 19.6095 28.8804C19.4542 28.7252 19.2436 28.6379 19.024 28.6379C18.8044 28.6379 18.5938 28.7252 18.4385 28.8804C18.2832 29.0357 18.196 29.2463 18.196 29.4659C18.196 30.5634 18.6319 31.6159 19.408 32.3919C20.184 33.168 21.2365 33.6039 22.334 33.6039H23.162V36.0859C23.162 36.3055 23.2492 36.5161 23.4045 36.6714C23.5598 36.8267 23.7704 36.9139 23.99 36.9139C24.2096 36.9139 24.4202 36.8267 24.5755 36.6714C24.7307 36.5161 24.818 36.3055 24.818 36.0859V33.6039H25.646C26.7434 33.6039 27.796 33.168 28.572 32.3919C29.348 31.6159 29.784 30.5634 29.784 29.4659V27.8099C29.784 26.7125 29.348 25.66 28.572 24.8839C27.796 24.1079 26.7434 23.6719 25.646 23.6719H24.818V18.7059C24.818 18.4863 24.7307 18.2757 24.5755 18.1205C24.4202 17.9652 24.2096 17.8779 23.99 17.8779C23.7704 17.8779 23.5598 17.9652 23.4045 18.1205C23.2492 18.2757 23.162 18.4863 23.162 18.7059V23.6719H22.334C21.6759 23.6714 21.0449 23.4097 20.5795 22.9444C20.1142 22.479 19.8525 21.848 19.852 21.1899V19.5339C19.8522 19.2071 19.917 18.8834 20.0426 18.5816C20.1682 18.2799 20.3521 18.0058 20.5838 17.7752C20.8155 17.5447 21.0904 17.3621 21.3928 17.238C21.6952 17.1138 22.0191 17.0506 22.346 17.0519L22.338 17.0499Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M11.71 12.2099C13.6587 10.2705 16.038 8.81892 18.654 7.97332C21.27 7.12772 24.0488 6.91207 26.764 7.34394C26.8727 7.3614 26.9838 7.35728 27.091 7.33181C27.1981 7.30633 27.2992 7.26 27.3884 7.19547C27.4776 7.13093 27.5533 7.04945 27.611 6.95568C27.6688 6.8619 27.7075 6.75767 27.725 6.64894C27.7424 6.5402 27.7383 6.42909 27.7128 6.32195C27.6874 6.21481 27.641 6.11374 27.5765 6.0245C27.512 5.93526 27.4305 5.85961 27.3367 5.80186C27.2429 5.74411 27.1387 5.7054 27.03 5.68794C23.0525 5.04153 18.9724 5.67402 15.3773 7.49435C11.7822 9.31469 8.85744 12.2289 7.02424 15.8175C5.19104 19.4061 4.54393 23.4839 5.17608 27.4637C5.80823 31.4435 7.68704 35.12 10.542 37.9639C10.7002 38.1011 10.9045 38.1732 11.1138 38.1657C11.3231 38.1583 11.5217 38.0718 11.6698 37.9238C11.8179 37.7757 11.9043 37.577 11.9118 37.3677C11.9192 37.1585 11.8471 36.9542 11.71 36.7959C10.0953 35.1818 8.81442 33.2654 7.94053 31.1561C7.06663 29.0468 6.61684 26.7861 6.61684 24.5029C6.61684 22.2198 7.06663 19.959 7.94053 17.8498C8.81442 15.7405 10.0953 13.8241 11.71 12.2099ZM37.458 11.0419C36.9116 10.4949 36.334 9.98007 35.728 9.49994C35.6147 9.39777 35.4755 9.32864 35.3256 9.30008C35.1758 9.27151 35.0209 9.28461 34.878 9.33794C34.7353 9.39119 34.6102 9.48284 34.5163 9.60276C34.4225 9.72268 34.3636 9.86621 34.3462 10.0175C34.3288 10.1688 34.3536 10.3219 34.4178 10.46C34.482 10.5981 34.5831 10.7157 34.71 10.7999C35.2627 11.2363 35.7902 11.7037 36.29 12.1999C39.5488 15.4602 41.3795 19.8812 41.3795 24.4909C41.3795 29.1006 39.5488 33.5217 36.29 36.7819C36.1739 36.881 36.0875 37.0101 36.0402 37.1552C35.9929 37.3002 35.9866 37.4555 36.022 37.6039C36.0579 37.7523 36.1341 37.888 36.2421 37.9959C36.3501 38.1038 36.4858 38.1799 36.6343 38.2156C36.7827 38.2514 36.9382 38.2455 37.0835 38.1986C37.2288 38.1518 37.3584 38.0657 37.458 37.9499C41.023 34.38 43.0254 29.5411 43.0254 24.4959C43.0254 19.4508 41.023 14.6119 37.458 11.0419Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M13.654 22.844L14.678 24.716L16.55 25.74L14.678 26.764L13.654 28.636L12.63 26.764L10.758 25.74L12.63 24.716L13.654 22.844ZM34.28 15.396L34.982 16.686L36.282 17.4L34.982 18.102L34.28 19.402L33.566 18.102L32.276 17.396L33.566 16.682L34.28 15.396ZM34.222 28.396L34.71 29.282L35.586 29.764L34.71 30.252L34.222 31.128L33.74 30.252L32.854 29.764L33.74 29.282L34.222 28.396Z",fill:"#FFF8F8"})),cy=e=>ae.createElement("svg",{width:48,height:46,viewBox:"0 0 48 46",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ae.createElement("path",{d:"M6 43.3579V1.35786L9.42857 3.92929L12.8571 1.35786L16.2857 3.92929L19.7143 1.35786L23.1429 3.92929L26.5714 1.35786L30 3.92929L33.4286 1.35786L36.8571 3.92929L40.2857 1.35786L42 3.07215V43.3579H6Z",fill:"#FAEFDE"}),ae.createElement("path",{d:"M44.5714 39.0721H42H5.99997H3.42855C2.00826 39.0721 0.857117 40.2233 0.857117 41.6436C0.857117 43.0639 2.00826 44.215 3.42855 44.215H44.5714C45.9917 44.215 47.1428 43.0639 47.1428 41.6436C47.1428 40.2233 45.9917 39.0721 44.5714 39.0721Z",fill:"#7E8189"}),ae.createElement("path",{d:"M6 36.5007H42V44.215H6V36.5007Z",fill:"#EFD8BE"}),ae.createElement("path",{d:"M44.5714 38.215H42.8571V3.07215C42.8571 2.84501 42.7671 2.62644 42.606 2.46615L40.8917 0.751868C40.59 0.450154 40.1126 0.415867 39.7714 0.672153L36.8571 2.85787L33.9437 0.672153C33.6394 0.443296 33.2194 0.443296 32.9151 0.672153L30 2.85787L27.0857 0.672153C26.7814 0.442439 26.3614 0.443296 26.0571 0.672153L23.1429 2.85787L20.2286 0.672153C19.9243 0.443296 19.5043 0.443296 19.2 0.672153L16.2857 2.85787L13.3714 0.672153C13.0671 0.443296 12.6471 0.443296 12.3429 0.672153L9.42857 2.85787L6.51429 0.672153C6.25457 0.476725 5.90657 0.44501 5.61686 0.590724C5.32629 0.736439 5.14286 1.03301 5.14286 1.35787V38.215H3.42857C1.53771 38.215 0 39.7527 0 41.6436C0 43.5344 1.53771 45.0722 3.42857 45.0722H44.5714C46.4623 45.0722 48 43.5344 48 41.6436C48 39.7527 46.4623 38.215 44.5714 38.215ZM3.42857 43.3579C2.48314 43.3579 1.71429 42.589 1.71429 41.6436C1.71429 40.6982 2.48314 39.9293 3.42857 39.9293H5.14286V43.3579H3.42857ZM6.85714 43.3579V39.0739V39.0722V39.0704V38.215C7.33029 38.215 7.71429 37.831 7.71429 37.3579V35.6436C7.71429 35.1704 7.33029 34.7864 6.85714 34.7864V3.07215L8.91429 4.61501C9.21857 4.84387 9.63857 4.84387 9.94286 4.61501L12.8571 2.4293L15.7714 4.61501C16.0757 4.84387 16.4957 4.84387 16.8 4.61501L19.7143 2.4293L22.6286 4.61501C22.9329 4.84472 23.3529 4.84387 23.6571 4.61501L26.5714 2.4293L29.4857 4.61501C29.79 4.84472 30.21 4.84387 30.5143 4.61501L33.4286 2.4293L36.3429 4.61501C36.6471 4.84387 37.0671 4.84387 37.3714 4.61501L40.2051 2.49015L41.1429 3.42701V34.7864C40.6697 34.7864 40.2857 35.1704 40.2857 35.6436V37.3579C40.2857 37.831 40.6697 38.215 41.1429 38.215V43.3579H6.85714ZM44.5714 43.3579H42.8571V39.9293H44.5714C45.5169 39.9293 46.2857 40.6982 46.2857 41.6436C46.2857 42.589 45.5169 43.3579 44.5714 43.3579Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M11.1428 34.7864C10.6697 34.7864 10.2857 35.1704 10.2857 35.6436V37.3579C10.2857 37.831 10.6697 38.215 11.1428 38.215C11.616 38.215 12 37.831 12 37.3579V35.6436C12 35.1704 11.616 34.7864 11.1428 34.7864ZM15.4286 34.7864C14.9554 34.7864 14.5714 35.1704 14.5714 35.6436V37.3579C14.5714 37.831 14.9554 38.215 15.4286 38.215C15.9017 38.215 16.2857 37.831 16.2857 37.3579V35.6436C16.2857 35.1704 15.9017 34.7864 15.4286 34.7864ZM19.7143 34.7864C19.2411 34.7864 18.8571 35.1704 18.8571 35.6436V37.3579C18.8571 37.831 19.2411 38.215 19.7143 38.215C20.1874 38.215 20.5714 37.831 20.5714 37.3579V35.6436C20.5714 35.1704 20.1874 34.7864 19.7143 34.7864ZM24 34.7864C23.5268 34.7864 23.1428 35.1704 23.1428 35.6436V37.3579C23.1428 37.831 23.5268 38.215 24 38.215C24.4731 38.215 24.8571 37.831 24.8571 37.3579V35.6436C24.8571 35.1704 24.4731 34.7864 24 34.7864ZM28.2857 34.7864C27.8126 34.7864 27.4286 35.1704 27.4286 35.6436V37.3579C27.4286 37.831 27.8126 38.215 28.2857 38.215C28.7588 38.215 29.1428 37.831 29.1428 37.3579V35.6436C29.1428 35.1704 28.7588 34.7864 28.2857 34.7864ZM32.5714 34.7864C32.0983 34.7864 31.7143 35.1704 31.7143 35.6436V37.3579C31.7143 37.831 32.0983 38.215 32.5714 38.215C33.0446 38.215 33.4286 37.831 33.4286 37.3579V35.6436C33.4286 35.1704 33.0446 34.7864 32.5714 34.7864ZM36.8571 34.7864C36.384 34.7864 36 35.1704 36 35.6436V37.3579C36 37.831 36.384 38.215 36.8571 38.215C37.3303 38.215 37.7143 37.831 37.7143 37.3579V35.6436C37.7143 35.1704 37.3303 34.7864 36.8571 34.7864Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M30 10.7864H35.1429C35.616 10.7864 36 10.4024 36 9.92929C36 9.45614 35.616 9.07214 35.1429 9.07214H30C29.5269 9.07214 29.1429 9.45614 29.1429 9.92929C29.1429 10.4024 29.5269 10.7864 30 10.7864ZM26.5714 9.07214H12.8571C12.384 9.07214 12 9.45614 12 9.92929C12 10.4024 12.384 10.7864 12.8571 10.7864H26.5714C27.0446 10.7864 27.4286 10.4024 27.4286 9.92929C27.4286 9.45614 27.0446 9.07214 26.5714 9.07214ZM12.8571 14.215H22.2857C22.7589 14.215 23.1429 13.831 23.1429 13.3579C23.1429 12.8847 22.7589 12.5007 22.2857 12.5007H12.8571C12.384 12.5007 12 12.8847 12 13.3579C12 13.831 12.384 14.215 12.8571 14.215ZM12.8571 21.0721H21.4286C21.9017 21.0721 22.2857 20.6881 22.2857 20.215C22.2857 19.7419 21.9017 19.3579 21.4286 19.3579H12.8571C12.384 19.3579 12 19.7419 12 20.215C12 20.6881 12.384 21.0721 12.8571 21.0721Z",fill:"#A5BAC6"}),ae.createElement("path",{d:"M21.4286 26.215H19.7143C19.2411 26.215 18.8571 26.599 18.8571 27.0722C18.8571 27.5453 19.2411 27.9293 19.7143 27.9293H21.4286C21.9017 27.9293 22.2857 27.5453 22.2857 27.0722C22.2857 26.599 21.9017 26.215 21.4286 26.215ZM16.2857 26.215H12.8571C12.384 26.215 12 26.599 12 27.0722C12 27.5453 12.384 27.9293 12.8571 27.9293H16.2857C16.7589 27.9293 17.1429 27.5453 17.1429 27.0722C17.1429 26.599 16.7589 26.215 16.2857 26.215ZM24 22.7864H12.8571C12.384 22.7864 12 23.1704 12 23.6436C12 24.1167 12.384 24.5007 12.8571 24.5007H24C24.4731 24.5007 24.8571 24.1167 24.8571 23.6436C24.8571 23.1704 24.4731 22.7864 24 22.7864Z",fill:"#EB9697"}),ae.createElement("path",{d:"M36 24.5007C36 23.083 34.8463 21.9293 33.4286 21.9293H31.7143C31.242 21.9293 30.8572 21.5444 30.8572 21.0722V18.5007C30.8572 18.0284 31.242 17.6436 31.7143 17.6436H33.4286C33.9009 17.6436 34.2857 18.0284 34.2857 18.5007V19.3579C34.2857 19.831 34.6697 20.215 35.1429 20.215C35.616 20.215 36 19.831 36 19.3579V18.5007C36 17.083 34.8463 15.9293 33.4286 15.9293V15.0722C33.4286 14.599 33.0446 14.215 32.5715 14.215C32.0983 14.215 31.7143 14.599 31.7143 15.0722V15.9293C30.2966 15.9293 29.1429 17.083 29.1429 18.5007V21.0722C29.1429 22.4899 30.2966 23.6436 31.7143 23.6436H33.4286C33.9009 23.6436 34.2857 24.0284 34.2857 24.5007V27.0722C34.2857 27.5444 33.9009 27.9293 33.4286 27.9293H31.7143C31.242 27.9293 30.8572 27.5444 30.8572 27.0722V26.215C30.8572 25.7419 30.4732 25.3579 30 25.3579C29.5269 25.3579 29.1429 25.7419 29.1429 26.215V27.0722C29.1429 28.4899 30.2966 29.6436 31.7143 29.6436V30.5007C31.7143 30.9739 32.0983 31.3579 32.5715 31.3579C33.0446 31.3579 33.4286 30.9739 33.4286 30.5007V29.6436C34.8463 29.6436 36 28.4899 36 27.0722V24.5007Z",fill:"#98C77C"})),dy=e=>ae.createElement("svg",{width:48,height:49,viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ae.createElement("path",{d:"M44.2069 35.2586C44.2069 35.2586 42.5517 39.3965 32.6207 39.3965C24.3448 39.3965 21.0345 34.431 21.0345 34.431V5.46551C21.0345 5.46551 22.2759 2.15517 32.4138 2.15517C42.5517 2.15517 44.2069 5.46551 44.2069 5.46551V35.2586Z",fill:"#FFEB9B"}),ae.createElement("path",{d:"M26 43.5345C26 43.5345 22.6896 46.8448 14.4138 46.8448C6.13792 46.8448 2.82758 43.5345 2.82758 43.5345V17.8793C2.82758 17.8793 4.06895 14.569 14.2069 14.569C24.3448 14.569 26 17.8793 26 17.8793V43.5345Z",fill:"#FFEB9B"}),ae.createElement("path",{d:"M26 43.5345C26 43.5345 21.862 47.6724 16.8965 47.6724C10.2758 47.6724 8.62067 46.8448 8.62067 46.8448V22.0172C8.62067 22.0172 11.931 22.8448 16.8965 22.8448C22.6896 22.8448 26 19.5345 26 18.7069C26 17.8793 26 43.5345 26 43.5345ZM44.2069 35.2586C44.2069 35.2586 40.0689 39.3965 35.1034 39.3965C28.4827 39.3965 26.8276 38.569 26.8276 38.569V8.77586C26.8276 8.77586 30.1379 9.60345 35.1034 9.60345C41.7241 9.60345 44.2069 5.46552 44.2069 5.46552V35.2586Z",fill:"#F9DD8F"}),ae.createElement("path",{d:"M18.5518 22.7199V47.5185C22.7476 46.7786 26 43.5345 26 43.5345C26 43.5345 26 16.2241 26 17.8793C26 19.5345 23.3112 22.0495 18.5518 22.7199ZM36.7587 9.47849V39.2426C40.9545 38.5028 44.2069 35.2586 44.2069 35.2586V4.63794C44.2069 4.63794 43.3793 8.77587 36.7587 9.47849Z",fill:"#EFC88E"}),ae.createElement("path",{d:"M20.2069 5.46552H21.8621V16.0859H20.2069V5.46552Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M32.6207 10.431C26.1233 10.431 20.2069 8.06497 20.2069 5.46552C20.2069 2.86607 26.1233 0.5 32.6207 0.5C39.1181 0.5 45.0345 2.86607 45.0345 5.46552C45.0345 5.92317 44.6646 6.2931 44.2069 6.2931C43.7493 6.2931 43.3793 5.92317 43.3793 5.46552C43.3793 4.51131 39.0916 2.15517 32.6207 2.15517C26.1498 2.15517 21.8621 4.51131 21.8621 5.46552C21.8621 6.41972 26.1498 8.77586 32.6207 8.77586C33.0784 8.77586 33.4483 9.14579 33.4483 9.60345C33.4483 10.0611 33.0784 10.431 32.6207 10.431Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M35.9583 10.2192C35.5479 10.2192 35.1912 9.91461 35.1382 9.49668C35.0811 9.04316 35.4006 8.62854 35.8541 8.57061C36.9639 8.42909 38.0273 8.21723 39.0146 7.94082C39.4508 7.81999 39.9117 8.07406 40.0342 8.51433C40.1575 8.95461 39.901 9.41144 39.4607 9.53392C38.3956 9.83185 37.2527 10.0603 36.0643 10.2117C36.0287 10.2167 35.9931 10.2192 35.9583 10.2192ZM14.4138 23.6724C7.91641 23.6724 2 21.3063 2 18.7069C2 16.1074 7.91641 13.7414 14.4138 13.7414C20.9112 13.7414 26.8276 16.1074 26.8276 18.7069C26.8276 19.1645 26.4577 19.5345 26 19.5345C25.5423 19.5345 25.1724 19.1645 25.1724 18.7069C25.1724 17.7527 20.8847 15.3965 14.4138 15.3965C7.9429 15.3965 3.65517 17.7527 3.65517 18.7069C3.65517 19.6611 7.9429 22.0172 14.4138 22.0172C14.8714 22.0172 15.2414 22.3872 15.2414 22.8448C15.2414 23.3025 14.8714 23.6724 14.4138 23.6724Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M17.8317 23.4506C17.4221 23.4506 17.0662 23.1477 17.0124 22.7306C16.9528 22.2779 17.2714 21.8616 17.725 21.8029C18.8083 21.6605 19.8477 21.4512 20.8143 21.1805C21.2497 21.0589 21.7114 21.3138 21.8339 21.7541C21.9572 22.1943 21.7007 22.6512 21.2604 22.7736C20.2177 23.0658 19.1012 23.2909 17.9393 23.4432C17.9037 23.4481 17.8673 23.4506 17.8317 23.4506ZM14.4138 28.6379C7.91641 28.6379 2 26.2719 2 23.6724H3.65517C3.65517 24.6266 7.9429 26.9828 14.4138 26.9828C20.8847 26.9828 25.1724 24.6266 25.1724 23.6724H26.8276C26.8276 26.2719 20.9112 28.6379 14.4138 28.6379ZM14.4138 38.569C7.91641 38.569 2 36.2029 2 33.6034H3.65517C3.65517 34.5576 7.9429 36.9138 14.4138 36.9138C20.8847 36.9138 25.1724 34.5576 25.1724 33.6034H26.8276C26.8276 36.2029 20.9112 38.569 14.4138 38.569ZM14.4138 33.6034C7.91641 33.6034 2 31.2374 2 28.6379H3.65517C3.65517 29.5921 7.9429 31.9483 14.4138 31.9483C20.8847 31.9483 25.1724 29.5921 25.1724 28.6379H26.8276C26.8276 31.2374 20.9112 33.6034 14.4138 33.6034ZM14.4138 43.5345C7.91641 43.5345 2 41.1684 2 38.569H3.65517C3.65517 39.5232 7.9429 41.8793 14.4138 41.8793C20.8847 41.8793 25.1724 39.5232 25.1724 38.569H26.8276C26.8276 41.1684 20.9112 43.5345 14.4138 43.5345ZM32.6207 15.3965C26.1233 15.3965 20.2069 13.0305 20.2069 10.431H21.8621C21.8621 11.3852 26.1498 13.7414 32.6207 13.7414C39.0916 13.7414 43.3793 11.3852 43.3793 10.431H45.0345C45.0345 13.0305 39.1181 15.3965 32.6207 15.3965ZM32.6207 20.3621C30.2662 20.3621 27.92 20.0575 25.8378 19.4823L26.2789 17.8868C28.2204 18.423 30.4127 18.7069 32.6207 18.7069C39.0916 18.7069 43.3793 16.3508 43.3793 15.3965H45.0345C45.0345 17.996 39.1181 20.3621 32.6207 20.3621Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M32.6207 25.3276C30.2513 25.3276 27.8935 25.0197 25.8022 24.4371L26.2466 22.8432C28.1947 23.3852 30.3986 23.6724 32.6207 23.6724C39.0916 23.6724 43.3793 21.3163 43.3793 20.3621H45.0345C45.0345 22.9615 39.118 25.3276 32.6207 25.3276ZM32.6207 30.2931C30.2496 30.2931 27.8902 29.9844 25.7972 29.401L26.2416 27.807C28.1914 28.3499 30.3969 28.6379 32.6207 28.6379C39.0916 28.6379 43.3793 26.2818 43.3793 25.3276H45.0345C45.0345 27.927 39.118 30.2931 32.6207 30.2931ZM32.6207 35.2586C30.2438 35.2586 27.8778 34.9483 25.7773 34.3615L26.2234 32.7676C28.1798 33.3138 30.392 33.6034 32.6207 33.6034C39.0916 33.6034 43.3793 31.2473 43.3793 30.2931H45.0345C45.0345 32.8925 39.118 35.2586 32.6207 35.2586Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M32.6207 40.2241C30.2513 40.2241 27.8935 39.9163 25.8022 39.3336L26.2466 37.7397C28.1947 38.2818 30.3986 38.569 32.6207 38.569C39.0916 38.569 43.3793 36.2128 43.3793 35.2586V5.46552H45.0345V35.2586C45.0345 37.8581 39.118 40.2241 32.6207 40.2241Z",fill:"#8D6C9F"}),ae.createElement("path",{d:"M14.4138 48.5C7.91641 48.5 2 46.1339 2 43.5345V18.7069H3.65517V43.5345C3.65517 44.4887 7.9429 46.8448 14.4138 46.8448C20.8847 46.8448 25.1724 44.4887 25.1724 43.5345V18.7069H26.8276V43.5345C26.8276 46.1339 20.9112 48.5 14.4138 48.5ZM17.7241 2.98275H16.069C15.6113 2.98275 15.2414 2.61282 15.2414 2.15516C15.2414 1.69751 15.6113 1.32758 16.069 1.32758H17.7241C18.1818 1.32758 18.5517 1.69751 18.5517 2.15516C18.5517 2.61282 18.1818 2.98275 17.7241 2.98275ZM17.7241 7.12068H16.069C15.6113 7.12068 15.2414 6.75075 15.2414 6.29309C15.2414 5.83544 15.6113 5.46551 16.069 5.46551H17.7241C18.1818 5.46551 18.5517 5.83544 18.5517 6.29309C18.5517 6.75075 18.1818 7.12068 17.7241 7.12068ZM17.7241 11.2586H16.069C15.6113 11.2586 15.2414 10.8887 15.2414 10.431C15.2414 9.97337 15.6113 9.60344 16.069 9.60344H17.7241C18.1818 9.60344 18.5517 9.97337 18.5517 10.431C18.5517 10.8887 18.1818 11.2586 17.7241 11.2586Z",fill:"#8D6C9F"})),Fn=t.appLocale.getLocalizedStrings().cockpit.portfolio,ia=({totalCashBalance:e,totalExpenses:n,totalRevenues:r,companyNameSticky:i})=>o.jsxRuntimeExports.jsxs(py,{companyNameSticky:i,children:[o.jsxRuntimeExports.jsxs(Bn,{children:[o.jsxRuntimeExports.jsx(Yt,{children:o.jsxRuntimeExports.jsx(ly,{})}),o.jsxRuntimeExports.jsxs(Yt,{children:[o.jsxRuntimeExports.jsx(Wn,{textColor:t.getCockpitColor("cashBalance"),children:t.amountToString("0,0",e)}),o.jsxRuntimeExports.jsx(_n,{children:Fn.cashUnderManagementText})]})]}),o.jsxRuntimeExports.jsxs(Bn,{children:[o.jsxRuntimeExports.jsx(Yt,{children:o.jsxRuntimeExports.jsx(cy,{})}),o.jsxRuntimeExports.jsxs(Yt,{children:[o.jsxRuntimeExports.jsx(Wn,{textColor:t.getCockpitColor("expenses"),children:t.amountToString("0,0",n)}),o.jsxRuntimeExports.jsx(_n,{children:Fn.expensesAcrossAllCustomersText})]})]}),o.jsxRuntimeExports.jsxs(Bn,{children:[o.jsxRuntimeExports.jsx(Yt,{children:o.jsxRuntimeExports.jsx(dy,{})}),o.jsxRuntimeExports.jsxs(Yt,{children:[o.jsxRuntimeExports.jsx(Wn,{textColor:t.getCockpitColor("revenues"),children:t.amountToString("0,0",r)}),o.jsxRuntimeExports.jsx(_n,{children:Fn.revenuesAcrossAllCustomersText})]})]})]}),py=s.div`
|
|
2886
2889
|
position: sticky;
|
|
2887
2890
|
top: 0;
|
|
2888
2891
|
z-index: 6;
|
|
@@ -2891,9 +2894,9 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2891
2894
|
padding-top: ${t.Space.sp6};
|
|
2892
2895
|
padding-bottom: ${t.Space.sp2};
|
|
2893
2896
|
|
|
2894
|
-
${e=>e.companyNameSticky?
|
|
2897
|
+
${e=>e.companyNameSticky?ve.css`
|
|
2895
2898
|
justify-content: center;
|
|
2896
|
-
`:
|
|
2899
|
+
`:ve.css`
|
|
2897
2900
|
min-width: 1365px;
|
|
2898
2901
|
justify-content: flex-start;
|
|
2899
2902
|
`};
|
|
@@ -2908,7 +2911,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2908
2911
|
color: ${e=>e.textColor.color.toString()};
|
|
2909
2912
|
`,_n=s(t.StandardRegular)`
|
|
2910
2913
|
color: ${e=>e.theme.colors.champion};
|
|
2911
|
-
`,Yt=s.div``,uy={portfolioRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},{common:{headers:{comments:my}},collaboration:{threads:{placeholder:{addANewComment:xy,replyAComment:hy},tooltip:{resolveComment:gy,unResolveComment:Sy}}}}=t.appLocale.getLocalizedStrings(),yy=({portfolioView:e,onColumnSortConfigChanged:n,onCompanyNameClicked:r,onPassportIconClicked:i,onScroll:a,initialOpenThreadRequest:d})=>{const l=t.useWindowSizeContext(),c=u.useRef(null),[p,m]=u.useState(null),[x,g]=u.useState(null),h=!(l==="small"||l==="medium-compact"),{uiState:C,totalCashBalance:b,totalExpenses:S,totalRevenues:y}=e,j=C.scrollYOffset??0,f=
|
|
2914
|
+
`,Yt=s.div``,uy={portfolioRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},{common:{headers:{comments:my}},collaboration:{threads:{placeholder:{addANewComment:xy,replyAComment:hy},tooltip:{resolveComment:gy,unResolveComment:Sy}}}}=t.appLocale.getLocalizedStrings(),yy=({portfolioView:e,onColumnSortConfigChanged:n,onCompanyNameClicked:r,onPassportIconClicked:i,onScroll:a,initialOpenThreadRequest:d})=>{const l=t.useWindowSizeContext(),c=u.useRef(null),[p,m]=u.useState(null),[x,g]=u.useState(null),h=!(l==="small"||l==="medium-compact"),{uiState:C,totalCashBalance:b,totalExpenses:S,totalRevenues:y}=e,j=C.scrollYOffset??0,f=O=>e.companies[O].company.company.companyInfo.name.length>Wt?Le+32:Le;u.useEffect(()=>{c.current&&c.current.resetAfterIndex(0)},[e]);const{setOpenThread:E,setRequestToOpenThread:$,requestToOpenThread:A,isLoading:I}=u.useContext(t.ThreadsContext);u.useEffect(()=>{d!=null&&e.fetchState==="Completed"&&I===!1&&$(d)},[d,e.fetchState,I,$]);const[w,k]=u.useState(void 0),N=u.useRef([]),D=u.useMemo(()=>({makeCompanyNameSticky:h,uiState:C,totalCashBalance:b,totalExpenses:S,totalRevenues:y,onColumnSortConfigChanged:n}),[h,b,S,y,C,n]),G=u.useCallback((O,Z,q)=>{const R=e.companies.findIndex(V=>V.company.company.companyInfo.companyId===O),T=Mt.findIndex(V=>V.key===Z);R!==-1&&T!==-1&&(N.current[R]==null?N.current[R]=[q]:N.current[R][T]=q)},[e.companies]);return u.useEffect(()=>{if(A!=null&&p!=null){const{companyId:O,entityType:Z}=A,[q,R]=Z.split("."),T=e.companies.findIndex(L=>L.company.company.companyInfo.companyId===O),V=Mt.findIndex(L=>L.key===R);T!==-1&&!(p.visibleStartIndex<=T&&p.visibleStopIndex>=T)&&c.current?.scrollToItem(T,"center"),setTimeout(()=>{const L=N.current[T]?.[0]?.getBoundingClientRect().bottom,J=N.current[T]?.[0]?.getBoundingClientRect().top;L!=null&&J!=null&&(window.innerHeight>=L&&window.innerHeight>=J||J<0)&&N.current[T][V]?.scrollIntoView({block:"center",behavior:"auto"})},0);const v=setInterval(()=>{const L=N.current[T]?.[V]?.getBoundingClientRect().left,J=N.current[T]?.[V]?.getBoundingClientRect().right,re=N.current[T]?.[V]?.offsetWidth;if(L!=null&&re!=null&&J!=null&&(L<window.innerWidth-re||J<window.innerWidth)){clearInterval(v);const F=A.threadId,K=A.onThreadShownCallback;F&&($(null),E(A.threadId),K?.())}},500);setTimeout(()=>{clearInterval(v),$(null)},2e3)}},[A,p,E,$]),o.jsxRuntimeExports.jsxs(Cy,{companyNameSticky:h,children:[h&&o.jsxRuntimeExports.jsx(ia,{totalCashBalance:b,totalExpenses:S,totalRevenues:y,companyNameSticky:h}),o.jsxRuntimeExports.jsx(jy,{companyNameSticky:h,children:o.jsxRuntimeExports.jsxs(aa.Provider,{value:D,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:O,width:Z})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:O,innerElementType:la,itemCount:e.companies.length,itemSize:f,onItemsRendered:q=>m(q),itemData:{portfolioView:e,makeCompanyNameSticky:h,addThreadRequestThreadId:w,setElementRef:G,setAddThreadRequestThreadId:k,setNoteData:g,onCompanyNameClicked:r,onPassportIconClicked:i},width:Z,ref:c,overscanCount:Bt,onScroll:({scrollOffset:q})=>{a(q)},initialScrollOffset:j,children:fy})}),x!=null?o.jsxRuntimeExports.jsx(Xe.RoomProvider,{id:x.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${x.companyName} ${my}`,filter:{application:"cockpit",companyId:x.companyId,entityType:x.entityType,isGlobalComment:!1,tab:"portfolio"},isLoading:!1,threadMetadata:{companyName:x.companyName,companyId:x.companyId,entityId:x.companyId,entityType:x.entityType,isGlobalComment:!1,application:"cockpit",tab:"portfolio",url:window.location.href},textOverrides:{composerPlaceholder:xy,replyComposerPlaceholder:hy,threadResolve:gy,threadUnResolve:Sy},onThreadClick:O=>null,onCloseAllThreadsDrawer:()=>g(null)})}):null]})})]})},aa=u.createContext(void 0),fy=({index:e,style:n,data:r})=>{const i=t.useWindowSizeContext(),{portfolioView:a,makeCompanyNameSticky:d,addThreadRequestThreadId:l,setElementRef:c,setNoteData:p,onCompanyNameClicked:m,onPassportIconClicked:x,setAddThreadRequestThreadId:g}=r,h=a.companies[e],{companyId:C}=h.company.company.companyInfo;return o.jsxRuntimeExports.jsx(by,{style:{...n,width:"fit-content",minWidth:"100%",padding:`${t.Space.sp0} ${uy.portfolioRightPadding.valuePx(i)} ${t.Space.sp3} ${t.Space.sp0}`},children:o.jsxRuntimeExports.jsx(YS,{addThreadRequestThreadId:l,setNoteData:p,setElementRef:c,setAddThreadRequestThreadId:g,totalHeight:typeof n.height=="number"?n.height:Le,companyView:a.companies[e],companyNameSticky:d,onCompanyNameClicked:m,onPassportIconClicked:x})},C)},la=u.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:d,uiState:l,totalCashBalance:c,totalExpenses:p,totalRevenues:m,onColumnSortConfigChanged:x}=u.useContext(aa);return o.jsxRuntimeExports.jsxs($y,{ref:n,style:{...i,width:"auto"},...a,children:[!d&&o.jsxRuntimeExports.jsx(ia,{totalCashBalance:c,totalExpenses:p,totalRevenues:m,companyNameSticky:d}),o.jsxRuntimeExports.jsx(zS,{companyNameSticky:d,onColumnSortConfigChanged:x,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),o.jsxRuntimeExports.jsx(Ry,{children:r})]})});la.displayName="Portfolio list view inner element type";const Cy=s.div`
|
|
2912
2915
|
width: 100%;
|
|
2913
2916
|
height: 100%;
|
|
2914
2917
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -2942,7 +2945,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2942
2945
|
height: calc(100vh - 45px);
|
|
2943
2946
|
overflow-y: hidden;
|
|
2944
2947
|
background-color: ${e=>e.theme.colors.grey4};
|
|
2945
|
-
`,ky=({headerData:e,headerActions:n,portfolioPageActions:r,portfolioPageData:i,initialOpenThreadRequest:a})=>{const{portfolioView:d}=i,{onColumnSortConfigChanged:l,onCompanyNameClicked:c,onPassportIconClicked:p,onScroll:m,onFiltersChange:x,onCockpitReloadData:g}=r,h=d.uiState.filterText,C=d.uiState.filters,b=d.fetchState==="Completed";return n.filterActions&&(n.filterActions.getCategoryWiseOptions=()=>Py()),o.jsxRuntimeExports.jsxs(wy,{children:[o.jsxRuntimeExports.jsx(dt,{headerActions:{...n},headerData:{...e,filterData:{filterText:h,filters:C},companiesLoaded:b,selectedTabOption:"portfolio",allTabOptions:e.allTabOptions??it}}),o.jsxRuntimeExports.jsx(Ty,{portfolioView:d,onColumnSortConfigChanged:l,onScroll:m,onCockpitReloadData:g,isFilterApplied:C?.categories!=null,onCompanyNameClicked:c,onPassportIconClicked:p,onClearFilter:()=>x("portfolio",{}),initialOpenThreadRequest:a})]})},Ty=({portfolioView:e,isFilterApplied:n,onColumnSortConfigChanged:r,onCompanyNameClicked:i,onPassportIconClicked:a,onCockpitReloadData:d,onScroll:l,onClearFilter:c,initialOpenThreadRequest:p})=>{const m=t.useWindowSizeContext();return e.fetchState==="Error"?o.jsxRuntimeExports.jsx($t,{onCockpitReloadData:d,selectedCockpitOption:"portfolio"}):e.fetchState==="In-Progress"||e.fetchState==="Not-Started"?o.jsxRuntimeExports.jsx(Ey,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})}):e.companies.length===0?n?o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchOnFilters,emptySearchTextSecondLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchTextSecondLine,filtersApplied:!0,onClearFilter:c}):o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchTextFirstLine,emptySearchTextSecondLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchTextSecondLine}):o.jsxRuntimeExports.jsx(vy,{windowSize:m,children:o.jsxRuntimeExports.jsx(yy,{portfolioView:e,onColumnSortConfigChanged:r,onScroll:l,onCompanyNameClicked:i,onPassportIconClicked:a,initialOpenThreadRequest:p})})},Py=()=>ji.reduce((n,r)=>{switch(r.value){case"netBurnOrIncome":return{...n,[r.value]:rl};case"cashPosition":return{...n,[r.value]:il};case"expenses":return{...n,[r.value]:al};case"income":return{...n,[r.value]:ll};case"runway":return{...n,[r.value]:cl};default:return{...n,[r.value]:[]}}},{}),Lr=t.appLocale.getLocalizedStrings().common,{dateFormat:Iy,aiAccountantCustomer:Vn}=t.appLocale.getLocalizedStrings(),Rs=({operationType:e,onCancel:n,onConfirm:r,dialogTitle:i,dialogDescription:a})=>{const d=o.useTheme(),[l,c]=u.useState(""),[p,m]=u.useState(""),x=e==="offboard",g=x||l.length>0&&p.length>0,h=e.replaceAll("_"," "),C=
|
|
2948
|
+
`,ky=({headerData:e,headerActions:n,portfolioPageActions:r,portfolioPageData:i,initialOpenThreadRequest:a})=>{const{portfolioView:d}=i,{onColumnSortConfigChanged:l,onCompanyNameClicked:c,onPassportIconClicked:p,onScroll:m,onFiltersChange:x,onCockpitReloadData:g}=r,h=d.uiState.filterText,C=d.uiState.filters,b=d.fetchState==="Completed";return n.filterActions&&(n.filterActions.getCategoryWiseOptions=()=>Py()),o.jsxRuntimeExports.jsxs(wy,{children:[o.jsxRuntimeExports.jsx(dt,{headerActions:{...n},headerData:{...e,filterData:{filterText:h,filters:C},companiesLoaded:b,selectedTabOption:"portfolio",allTabOptions:e.allTabOptions??it}}),o.jsxRuntimeExports.jsx(Ty,{portfolioView:d,onColumnSortConfigChanged:l,onScroll:m,onCockpitReloadData:g,isFilterApplied:C?.categories!=null,onCompanyNameClicked:c,onPassportIconClicked:p,onClearFilter:()=>x("portfolio",{}),initialOpenThreadRequest:a})]})},Ty=({portfolioView:e,isFilterApplied:n,onColumnSortConfigChanged:r,onCompanyNameClicked:i,onPassportIconClicked:a,onCockpitReloadData:d,onScroll:l,onClearFilter:c,initialOpenThreadRequest:p})=>{const m=t.useWindowSizeContext();return e.fetchState==="Error"?o.jsxRuntimeExports.jsx($t,{onCockpitReloadData:d,selectedCockpitOption:"portfolio"}):e.fetchState==="In-Progress"||e.fetchState==="Not-Started"?o.jsxRuntimeExports.jsx(Ey,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})}):e.companies.length===0?n?o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchOnFilters,emptySearchTextSecondLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchTextSecondLine,filtersApplied:!0,onClearFilter:c}):o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchTextFirstLine,emptySearchTextSecondLine:t.appLocale.getLocalizedStrings().cockpit.emptySearchTextSecondLine}):o.jsxRuntimeExports.jsx(vy,{windowSize:m,children:o.jsxRuntimeExports.jsx(yy,{portfolioView:e,onColumnSortConfigChanged:r,onScroll:l,onCompanyNameClicked:i,onPassportIconClicked:a,initialOpenThreadRequest:p})})},Py=()=>ji.reduce((n,r)=>{switch(r.value){case"netBurnOrIncome":return{...n,[r.value]:rl};case"cashPosition":return{...n,[r.value]:il};case"expenses":return{...n,[r.value]:al};case"income":return{...n,[r.value]:ll};case"runway":return{...n,[r.value]:cl};default:return{...n,[r.value]:[]}}},{}),Lr=t.appLocale.getLocalizedStrings().common,{dateFormat:Iy,aiAccountantCustomer:Vn}=t.appLocale.getLocalizedStrings(),Rs=({operationType:e,onCancel:n,onConfirm:r,dialogTitle:i,dialogDescription:a})=>{const d=o.useTheme(),[l,c]=u.useState(""),[p,m]=u.useState(""),x=e==="offboard",g=x||l.length>0&&p.length>0,h=e.replaceAll("_"," "),C=ee.zeniDate(new Date().toISOString()).format(Iy.analytics.YYYYDashMMDashDDFormat),b=i??`${Vn.jobTriggerDialog.title} — ${h}`;return o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:b}),descriptionComponent:a!=null?o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:a}):void 0,primaryButtonText:Lr.confirm,secondaryButtonText:Lr.cancel,useLegacyStyles:!0,isProceedDisabled:!g,action:{onOkClick:()=>{g&&r(e,l,p)},onCancelClick:n,onClickAway:n},shouldClickAway:!0,style:{background:d.colors.overlayColor},children:!x&&o.jsxRuntimeExports.jsxs(Ly,{children:[o.jsxRuntimeExports.jsxs(Ar,{children:[o.jsxRuntimeExports.jsx(Dr,{children:Vn.jobTriggerDialog.startDate}),o.jsxRuntimeExports.jsx(Or,{type:"date",value:l,max:p.length>0?p:C,onChange:S=>c(S.target.value)})]}),o.jsxRuntimeExports.jsxs(Ar,{children:[o.jsxRuntimeExports.jsx(Dr,{children:Vn.jobTriggerDialog.endDate}),o.jsxRuntimeExports.jsx(Or,{type:"date",value:p,min:l.length>0?l:void 0,max:C,onChange:S=>m(S.target.value)})]})]})})},Ly=s.div`
|
|
2946
2949
|
display: flex;
|
|
2947
2950
|
flex-direction: column;
|
|
2948
2951
|
gap: ${t.Space.sp3};
|
|
@@ -2965,7 +2968,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2965
2968
|
outline: none;
|
|
2966
2969
|
border-color: ${e=>e.theme.colors.primary};
|
|
2967
2970
|
}
|
|
2968
|
-
`,{aiAccountantCustomer:ft}=t.appLocale.getLocalizedStrings(),
|
|
2971
|
+
`,{aiAccountantCustomer:ft}=t.appLocale.getLocalizedStrings(),ge={rowHeightPx:t.sp[8],headerHeightPx:44,jobRowHeightPx:44,jobHeaderHeightPx:36,jobTableMinHeightPx:200,jobOperationMinWidthPx:120,jobStatusColumnWidthPx:90,jobDateColumnWidthPx:120,jobByColumnWidthPx:100,jobSkeletonRowCount:3,skeletonLoaderHeightPx:14,accuracyLabelMinWidthPx:80,accuracyValueMinWidthPx:45,accuracySuccessThresholdPercent:80,accuracyAlertThresholdPercent:60,sortIconSize:t.Space.sp2,menuIconSize:t.Space.sp3,statusBadgeVerticalPadding:"2px",accuracyBarHeight:t.Space.sp2,globalNavBarHeightPx:45,pageHeaderHeightPx:75,menuDropdownMinWidthPx:160,checkboxColumnWidthPx:40},ot={companyName:200,status:120,bookcloseDate:130,latestTraining:130,latestSync:130,accuracy:100,actions:60},Ay=[{key:"companyName",label:ft.table.company,sortable:!0,width:ot.companyName,justifyContent:"flex-start",growToFill:!0},{key:"status",label:ft.table.status,sortable:!0,width:ot.status,justifyContent:"flex-start"},{key:"bookcloseDate",label:ft.table.bookClose,sortable:!0,width:ot.bookcloseDate,justifyContent:"flex-start"},{key:"latestTraining",label:ft.table.lastTraining,sortable:!0,width:ot.latestTraining,justifyContent:"flex-start"},{key:"latestSync",label:ft.table.lastSync,sortable:!0,width:ot.latestSync,justifyContent:"flex-start"},{key:"accuracy",label:ft.table.accuracy,sortable:!0,width:ot.accuracy,justifyContent:"flex-end"},{key:"actions",label:"",sortable:!1,width:ot.actions,justifyContent:"center"}],$s={onboard:{labelKey:"onboard",destructive:!1},evaluate:{labelKey:"evaluate",destructive:!1},full_pipeline:{labelKey:"fullPipeline",destructive:!1},retrain:{labelKey:"retrain",destructive:!1},offboard:{labelKey:"offboard",destructive:!0},cancel_onboarding:{labelKey:"cancelOnboarding",destructive:!0}},ca=(e,n)=>{const{jobTriggerDialog:r}=ft;return e==="offboard"?r.singleDescriptionOffboard.replace("__companyName__",n):r.singleDescription.replace("__companyName__",n).replace("__datesInstruction__",r.datesInstruction)},Es=e=>ee.getAllowedOperationsForStatus(e).map(n=>({operationType:n,...$s[n]})),da=e=>ft.filters.enrollmentStatus[e]??e;function vs(){const{useDynamicConfig:e}=t.useZeniFeatureContext(),{configValue:n}=e(t.DynamicConfigNames.aiAccountantOnboardingConfig),r=t.useGlobalInfoContext().loggedInUser;return n==null||r?.userId==null?!1:Array.isArray(n.user_list_with_write_access)&&n.user_list_with_write_access.includes(r.userId)}const{common:{strings:qt},dateFormat:an,timeFormat:Ro,aiAccountantCustomer:Ve}=t.appLocale.getLocalizedStrings(),Dy=({customer:e,hasMoreJobs:n,jobs:r,jobsFetchStatus:i,onAction:a,onCancelOnboarding:d,onClose:l,onLoadMoreJobs:c})=>{const[p,m]=u.useState(null),x=vs(),g=e.enrollment?.status??"unknown",h=e.enrollment,C=h?.accuracy??{},b=i.fetchState==="In-Progress",S=E=>{m({operationType:E})},y=(E,$,A)=>{a(e,E,$,A),m(null)},j=E=>E<r.length,f=()=>{n&&!b&&c()};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(zy,{children:[o.jsxRuntimeExports.jsx(Fy,{children:o.jsxRuntimeExports.jsxs(By,{children:[o.jsxRuntimeExports.jsx(Wy,{}),o.jsxRuntimeExports.jsxs(_y,{children:[o.jsxRuntimeExports.jsx(Vy,{children:e.companyName}),o.jsxRuntimeExports.jsx(Uy,{children:e.tenantId})]}),o.jsxRuntimeExports.jsx(Hy,{onClick:l,children:o.jsxRuntimeExports.jsx(Ky,{})})]})}),o.jsxRuntimeExports.jsxs(Gy,{children:[o.jsxRuntimeExports.jsxs(Un,{children:[o.jsxRuntimeExports.jsx(Go,{children:Ve.drawer.enrollmentDetails}),o.jsxRuntimeExports.jsxs(Zy,{children:[o.jsxRuntimeExports.jsxs(uo,{children:[o.jsxRuntimeExports.jsx(mo,{children:Ve.drawer.statusLabel}),o.jsxRuntimeExports.jsx(xo,{children:da(g)})]}),o.jsxRuntimeExports.jsxs(uo,{children:[o.jsxRuntimeExports.jsx(mo,{children:Ve.drawer.onboarded}),o.jsxRuntimeExports.jsx(xo,{title:h?.onboardedAt!=null?h.onboardedAt.format(Ro.hmmADashDDMMMCommaYYYY):void 0,children:h?.onboardedAt!=null?h.onboardedAt.format(an.visual.MMMDCommaYYYYformat):qt.emDash})]}),o.jsxRuntimeExports.jsxs(uo,{children:[o.jsxRuntimeExports.jsx(mo,{children:Ve.drawer.lastTraining}),o.jsxRuntimeExports.jsx(xo,{title:h?.latestTraining!=null?h.latestTraining.format(Ro.hmmADashDDMMMCommaYYYY):void 0,children:h?.latestTraining!=null?h.latestTraining.format(an.visual.MMMDCommaYYYYformat):qt.emDash})]}),o.jsxRuntimeExports.jsxs(uo,{children:[o.jsxRuntimeExports.jsx(mo,{children:Ve.drawer.lastSync}),o.jsxRuntimeExports.jsx(xo,{title:h?.latestTransactionSync!=null?h.latestTransactionSync.local().format(Ro.hmmADashDDMMMCommaYYYY):void 0,children:h?.latestTransactionSync!=null?h.latestTransactionSync.utc(!0).fromNow():qt.emDash})]}),h?.offboardedAt!=null&&o.jsxRuntimeExports.jsxs(uo,{children:[o.jsxRuntimeExports.jsx(mo,{children:Ve.drawer.offboarded}),o.jsxRuntimeExports.jsx(xo,{title:h.offboardedAt.format(Ro.hmmADashDDMMMCommaYYYY),children:h.offboardedAt.format(an.visual.MMMDCommaYYYYformat)})]})]})]}),o.jsxRuntimeExports.jsxs(Un,{children:[o.jsxRuntimeExports.jsx(Go,{children:Ve.drawer.modelAccuracy}),Object.keys(C).length>0?o.jsxRuntimeExports.jsx(Xy,{children:Object.entries(C).map(([E,$])=>{const A=$*100,I=Ny(A),w=`${A.toFixed(0)}${qt.percentage}`,k=`${A.toFixed(1)}${qt.percentage}`;return o.jsxRuntimeExports.jsxs(qy,{children:[o.jsxRuntimeExports.jsx(Qy,{children:My(E)}),o.jsxRuntimeExports.jsx(Jy,{children:o.jsxRuntimeExports.jsx(ef,{style:{width:w,backgroundColor:I}})}),o.jsxRuntimeExports.jsx(tf,{children:k})]},E)})}):o.jsxRuntimeExports.jsx(Nr,{children:Ve.drawer.noAccuracyData})]}),x&&o.jsxRuntimeExports.jsxs(Un,{children:[o.jsxRuntimeExports.jsx(Go,{children:Ve.drawer.actionsTitle}),o.jsxRuntimeExports.jsx(of,{children:Es(g).map(E=>o.jsxRuntimeExports.jsx(t.Button,{label:Ve.actions[E.labelKey],variant:E.destructive?"destructive":"outline",size:"small",onClick:()=>{E.operationType==="cancel_onboarding"?d(e):S(E.operationType)}},E.operationType))})]}),o.jsxRuntimeExports.jsxs(Yy,{children:[o.jsxRuntimeExports.jsx(Go,{children:Ve.drawer.jobHistory}),r.length===0&&!b?o.jsxRuntimeExports.jsx(Nr,{children:Ve.drawer.noJobsFound}):o.jsxRuntimeExports.jsxs(nf,{children:[o.jsxRuntimeExports.jsxs(sf,{children:[o.jsxRuntimeExports.jsx(rf,{children:o.jsxRuntimeExports.jsx(t.ExtraSmallSemiBold,{children:Ve.drawer.operation})}),o.jsxRuntimeExports.jsx(af,{children:o.jsxRuntimeExports.jsx(t.ExtraSmallSemiBold,{children:Ve.drawer.status})}),o.jsxRuntimeExports.jsx(lf,{children:o.jsxRuntimeExports.jsx(t.ExtraSmallSemiBold,{children:Ve.drawer.created})}),o.jsxRuntimeExports.jsx(cf,{children:o.jsxRuntimeExports.jsx(t.ExtraSmallSemiBold,{children:Ve.drawer.by})})]}),o.jsxRuntimeExports.jsx(df,{children:o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:E,width:$})=>o.jsxRuntimeExports.jsx(o.InfiniteLoader,{isItemLoaded:j,itemCount:n?r.length+1:r.length,loadMoreItems:f,children:({onItemsRendered:A})=>o.jsxRuntimeExports.jsx(o.FixedSizeList,{height:E,width:$,itemCount:r.length,itemSize:ge.jobRowHeightPx,itemData:r,onItemsRendered:A,innerElementType:Oy,overscanCount:ge.jobSkeletonRowCount,children:pa})})})}),b&&o.jsxRuntimeExports.jsx(gf,{children:Array.from({length:ge.jobSkeletonRowCount},(E,$)=>o.jsxRuntimeExports.jsxs(Sf,{children:[o.jsxRuntimeExports.jsx(Yo,{$flex:!0,children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:$%2===0?90:70,height:ge.skeletonLoaderHeightPx})}),o.jsxRuntimeExports.jsx(Yo,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:60,height:ge.skeletonLoaderHeightPx})}),o.jsxRuntimeExports.jsx(Yo,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:t.Space.sp11,height:ge.skeletonLoaderHeightPx})}),o.jsxRuntimeExports.jsx(Yo,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:70,height:ge.skeletonLoaderHeightPx})})]},`skeleton-${$}`))})]})]})]})]}),p!=null&&o.jsxRuntimeExports.jsx(Rs,{operationType:p.operationType,dialogTitle:Ve.actions[$s[p.operationType].labelKey],dialogDescription:ca(p.operationType,e.companyName),onCancel:()=>m(null),onConfirm:y})]})},pa=u.memo(({index:e,style:n,data:r})=>{const i=r[e],a=i.operationType.replaceAll("_"," "),d=i.triggeredBy!=null?`${i.triggeredBy.firstName} ${i.triggeredBy.lastName}`.trim():qt.emDash;return o.jsxRuntimeExports.jsxs(pf,{style:n,children:[o.jsxRuntimeExports.jsx(uf,{children:a}),o.jsxRuntimeExports.jsx(mf,{children:i.status}),o.jsxRuntimeExports.jsx(xf,{title:i.createdAt.format(Ro.hmmADashDDMMMCommaYYYY),children:i.createdAt.format(an.visual.MMMDCommaYYYYformat)}),o.jsxRuntimeExports.jsx(hf,{children:d})]})});pa.displayName="JobListItem";const Oy=u.forwardRef(({style:e,...n},r)=>o.jsxRuntimeExports.jsx("div",{ref:r,style:{...e,position:"relative"},...n})),Ny=e=>e>=ge.accuracySuccessThresholdPercent?t.Colors.success:e>=ge.accuracyAlertThresholdPercent?t.Colors.alert:t.Colors.important,My=e=>e.split("_").filter(n=>n.length>0).map(n=>n[0].toUpperCase()+n.slice(1).toLowerCase()).join(" "),zy=s.div`
|
|
2969
2972
|
display: flex;
|
|
2970
2973
|
flex-direction: column;
|
|
2971
2974
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -3050,7 +3053,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3050
3053
|
color: ${e=>e.theme.colors.hero};
|
|
3051
3054
|
`,xo=s(t.SmallRegular)`
|
|
3052
3055
|
color: ${e=>e.theme.colors.champion};
|
|
3053
|
-
margin-top: ${
|
|
3056
|
+
margin-top: ${ge.statusBadgeVerticalPadding};
|
|
3054
3057
|
`,Xy=s.div`
|
|
3055
3058
|
display: flex;
|
|
3056
3059
|
flex-direction: column;
|
|
@@ -3061,32 +3064,32 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3061
3064
|
gap: ${t.Space.sp3};
|
|
3062
3065
|
`,Qy=s(t.SmallRegular)`
|
|
3063
3066
|
text-transform: capitalize;
|
|
3064
|
-
min-width: ${
|
|
3067
|
+
min-width: ${ge.accuracyLabelMinWidthPx}px;
|
|
3065
3068
|
color: ${e=>e.theme.colors.champion};
|
|
3066
3069
|
`,Jy=s.div`
|
|
3067
3070
|
flex: 1;
|
|
3068
|
-
height: ${
|
|
3071
|
+
height: ${ge.accuracyBarHeight};
|
|
3069
3072
|
background-color: ${e=>e.theme.colors.grey3};
|
|
3070
3073
|
border-radius: ${t.Space.sp1};
|
|
3071
3074
|
overflow: hidden;
|
|
3072
|
-
`,
|
|
3075
|
+
`,ef=s.div`
|
|
3073
3076
|
height: 100%;
|
|
3074
3077
|
border-radius: ${t.Space.sp1};
|
|
3075
3078
|
transition: width 0.3s ease;
|
|
3076
|
-
`,
|
|
3077
|
-
min-width: ${
|
|
3079
|
+
`,tf=s(t.SmallRegular)`
|
|
3080
|
+
min-width: ${ge.accuracyValueMinWidthPx}px;
|
|
3078
3081
|
text-align: right;
|
|
3079
3082
|
color: ${e=>e.theme.colors.champion};
|
|
3080
3083
|
`,Nr=s(t.SmallRegular)`
|
|
3081
3084
|
color: ${e=>e.theme.colors.hero};
|
|
3082
|
-
`,
|
|
3085
|
+
`,of=s.div`
|
|
3083
3086
|
display: flex;
|
|
3084
3087
|
gap: ${t.Space.sp2};
|
|
3085
3088
|
flex-wrap: wrap;
|
|
3086
|
-
`,
|
|
3089
|
+
`,nf=s.div`
|
|
3087
3090
|
position: relative;
|
|
3088
3091
|
flex: 1;
|
|
3089
|
-
min-height: ${
|
|
3092
|
+
min-height: ${ge.jobTableMinHeightPx}px;
|
|
3090
3093
|
display: flex;
|
|
3091
3094
|
flex-direction: column;
|
|
3092
3095
|
border-radius: ${t.Space.sp2};
|
|
@@ -3105,11 +3108,11 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3105
3108
|
pointer-events: none;
|
|
3106
3109
|
z-index: 10;
|
|
3107
3110
|
}
|
|
3108
|
-
`,
|
|
3111
|
+
`,sf=s.div`
|
|
3109
3112
|
display: flex;
|
|
3110
3113
|
flex-direction: row;
|
|
3111
3114
|
align-items: center;
|
|
3112
|
-
min-height: ${
|
|
3115
|
+
min-height: ${ge.jobHeaderHeightPx}px;
|
|
3113
3116
|
background: ${e=>e.theme.colors.grey4};
|
|
3114
3117
|
border-bottom: 1px solid ${e=>e.theme.colors.grey2};
|
|
3115
3118
|
color: ${e=>e.theme.colors.hero};
|
|
@@ -3118,23 +3121,23 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3118
3121
|
display: flex;
|
|
3119
3122
|
align-items: center;
|
|
3120
3123
|
padding: ${t.Space.sp1} ${t.Space.sp2};
|
|
3121
|
-
`,
|
|
3124
|
+
`,rf=s(gn)`
|
|
3122
3125
|
flex: 1 1 auto;
|
|
3123
|
-
min-width: ${
|
|
3124
|
-
`,
|
|
3125
|
-
width: ${
|
|
3126
|
-
`,
|
|
3127
|
-
width: ${
|
|
3128
|
-
`,
|
|
3129
|
-
width: ${
|
|
3130
|
-
`,
|
|
3126
|
+
min-width: ${ge.jobOperationMinWidthPx}px;
|
|
3127
|
+
`,af=s(gn)`
|
|
3128
|
+
width: ${ge.jobStatusColumnWidthPx}px;
|
|
3129
|
+
`,lf=s(gn)`
|
|
3130
|
+
width: ${ge.jobDateColumnWidthPx}px;
|
|
3131
|
+
`,cf=s(gn)`
|
|
3132
|
+
width: ${ge.jobByColumnWidthPx}px;
|
|
3133
|
+
`,df=s.div`
|
|
3131
3134
|
flex: 1;
|
|
3132
3135
|
min-height: 0;
|
|
3133
|
-
`,
|
|
3136
|
+
`,pf=s.div`
|
|
3134
3137
|
display: flex;
|
|
3135
3138
|
flex-direction: row;
|
|
3136
3139
|
align-items: center;
|
|
3137
|
-
min-height: ${
|
|
3140
|
+
min-height: ${ge.jobRowHeightPx}px;
|
|
3138
3141
|
background: ${e=>e.theme.colors.grey5};
|
|
3139
3142
|
color: ${e=>e.theme.colors.champion};
|
|
3140
3143
|
padding: ${t.Space.sp0} ${t.Space.sp3};
|
|
@@ -3150,33 +3153,33 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3150
3153
|
text-transform: capitalize;
|
|
3151
3154
|
overflow: hidden;
|
|
3152
3155
|
border-bottom: 1px solid ${e=>e.theme.colors.grey2};
|
|
3153
|
-
min-height: ${
|
|
3154
|
-
`,
|
|
3156
|
+
min-height: ${ge.jobRowHeightPx}px;
|
|
3157
|
+
`,uf=s(Sn)`
|
|
3155
3158
|
flex: 1 1 auto;
|
|
3156
|
-
min-width: ${
|
|
3157
|
-
`,
|
|
3158
|
-
width: ${
|
|
3159
|
-
`,
|
|
3160
|
-
width: ${
|
|
3161
|
-
`,
|
|
3162
|
-
width: ${
|
|
3163
|
-
`,
|
|
3159
|
+
min-width: ${ge.jobOperationMinWidthPx}px;
|
|
3160
|
+
`,mf=s(Sn)`
|
|
3161
|
+
width: ${ge.jobStatusColumnWidthPx}px;
|
|
3162
|
+
`,xf=s(Sn)`
|
|
3163
|
+
width: ${ge.jobDateColumnWidthPx}px;
|
|
3164
|
+
`,hf=s(Sn)`
|
|
3165
|
+
width: ${ge.jobByColumnWidthPx}px;
|
|
3166
|
+
`,gf=s.div`
|
|
3164
3167
|
display: flex;
|
|
3165
3168
|
flex-direction: column;
|
|
3166
|
-
`,
|
|
3169
|
+
`,Sf=s.div`
|
|
3167
3170
|
display: flex;
|
|
3168
3171
|
flex-direction: row;
|
|
3169
3172
|
align-items: center;
|
|
3170
|
-
min-height: ${
|
|
3173
|
+
min-height: ${ge.jobRowHeightPx}px;
|
|
3171
3174
|
padding: ${t.Space.sp0} ${t.Space.sp3};
|
|
3172
3175
|
background: ${e=>e.theme.colors.grey5};
|
|
3173
3176
|
border-bottom: 1px solid ${e=>e.theme.colors.grey2};
|
|
3174
3177
|
box-sizing: border-box;
|
|
3175
3178
|
`,Yo=s.div`
|
|
3176
3179
|
flex: ${e=>e.$flex===!0?"1 1 auto":"0 0 auto"};
|
|
3177
|
-
min-width: ${e=>e.$flex===!0?`${
|
|
3180
|
+
min-width: ${e=>e.$flex===!0?`${ge.jobOperationMinWidthPx}px`:`${ge.jobStatusColumnWidthPx}px`};
|
|
3178
3181
|
padding: ${t.Space.sp1} ${t.Space.sp2};
|
|
3179
|
-
`,{common:{texts:
|
|
3182
|
+
`,{common:{texts:yf}}=t.appLocale.getLocalizedStrings();function ff(e){return o.jsxRuntimeExports.jsxs(Cf,{isEnabled:e.isEnabled,onClick:e.onClick,children:[o.jsxRuntimeExports.jsx(bf,{spinRefreshIcon:e.spinRefreshIcon,children:o.jsxRuntimeExports.jsx(Rf,{})}),o.jsxRuntimeExports.jsx(jf,{children:yf.refresh})]})}const Cf=s.div`
|
|
3180
3183
|
position: relative;
|
|
3181
3184
|
display: flex;
|
|
3182
3185
|
width: fit-content;
|
|
@@ -3187,25 +3190,25 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3187
3190
|
&:hover {
|
|
3188
3191
|
color: ${e=>e.isEnabled?e.theme.colors.primary:void 0};
|
|
3189
3192
|
}
|
|
3190
|
-
`,
|
|
3193
|
+
`,jf=s(t.StandardRegularSp)`
|
|
3191
3194
|
margin-left: ${t.Space.sp2};
|
|
3192
3195
|
display: flex;
|
|
3193
3196
|
align-items: center;
|
|
3194
|
-
`,
|
|
3195
|
-
animation: ${e=>e.spinRefreshIcon??!1?
|
|
3196
|
-
${
|
|
3197
|
+
`,bf=s.div`
|
|
3198
|
+
animation: ${e=>e.spinRefreshIcon??!1?ve.css`
|
|
3199
|
+
${$f} 3s
|
|
3197
3200
|
`:"none"};
|
|
3198
|
-
`,
|
|
3201
|
+
`,Rf=s(t.SvgRefresh)`
|
|
3199
3202
|
height: ${t.Space.sp4};
|
|
3200
3203
|
width: ${t.Space.sp4};
|
|
3201
|
-
|
|
3204
|
+
`,$f=ve.keyframes`
|
|
3202
3205
|
0% {
|
|
3203
3206
|
rotate: 0
|
|
3204
3207
|
}
|
|
3205
3208
|
100% {
|
|
3206
3209
|
rotate: 720deg;
|
|
3207
3210
|
}
|
|
3208
|
-
`,{common:{strings:ho},dateFormat:Mr,timeFormat:zr,aiAccountantCustomer:hs}=t.appLocale.getLocalizedStrings()
|
|
3211
|
+
`,{common:{strings:ho},dateFormat:Mr,timeFormat:zr,aiAccountantCustomer:hs}=t.appLocale.getLocalizedStrings(),Ef=({customers:e,sortKey:n,sortOrder:r,selectedTenantIds:i,onAction:a,onCancelOnboarding:d,onColumnSortConfigChanged:l,onRowClick:c,onToggleAllVisible:p,onToggleTenantSelection:m})=>{const[x,g]=u.useState(null),h=vs(),C=u.useMemo(()=>new Set(i),[i]),b=i.length>0,S=u.useMemo(()=>e.map(N=>N.tenantId),[e]),y=u.useMemo(()=>S.filter(N=>C.has(N)).length,[S,C]),j=S.length>0&&y===S.length,f=y>0&&!j,E=N=>{l(N,n===N&&r==="ascending"?"descending":"ascending")},$=u.useCallback((N,D)=>{g({customer:N,operationType:D})},[]),A=u.useCallback((N,D,G)=>{x!=null&&a(x.customer,N,D,G),g(null)},[a,x]),I=u.useRef(null),w=u.useMemo(()=>({customerCount:e.length,customers:e,hasWriteAccess:h,isSelectionActive:b,onCancelOnboarding:d,onRequestAction:$,onRowClick:c,onToggleTenantSelection:m,selectedTenantIdSet:C}),[e,h,b,d,$,c,m,C]),k=u.useCallback(({scrollOffset:N})=>{I.current!=null&&(I.current.scrollLeft=N)},[]);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(wf,{children:[o.jsxRuntimeExports.jsxs(kf,{ref:I,children:[h&&o.jsxRuntimeExports.jsx(Of,{children:o.jsxRuntimeExports.jsx(o.Checkbox,{size:"small",checked:j,indeterminate:f,disabled:S.length===0,onChange:()=>p(S)})}),Ay.map(N=>{const D=n===N.key,G=r==="ascending"?"asc":"desc";return o.jsxRuntimeExports.jsx(Tf,{$width:N.width,$justifyContent:N.justifyContent,$growToFill:N.growToFill,children:o.jsxRuntimeExports.jsx(Pf,{children:N.sortable&&N.key!=="actions"?o.jsxRuntimeExports.jsxs(If,{type:"button",$active:D,onClick:()=>E(N.key),children:[N.label,o.jsxRuntimeExports.jsx(Lf,{$direction:D?G:"asc",children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:ge.sortIconSize,height:ge.sortIconSize})})]}):N.label})},N.key)})]}),e.length===0?o.jsxRuntimeExports.jsx(Wf,{children:hs.table.noCustomersFound}):o.jsxRuntimeExports.jsx(Af,{children:o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:N,width:D})=>o.jsxRuntimeExports.jsx(o.FixedSizeList,{height:N,width:D,itemCount:e.length,itemSize:ge.rowHeightPx,itemData:w,innerElementType:vf,onScroll:k,overscanCount:5,children:ua})})})]}),x!=null&&o.jsxRuntimeExports.jsx(Rs,{operationType:x.operationType,dialogTitle:hs.actions[$s[x.operationType].labelKey],dialogDescription:ca(x.operationType,x.customer.companyName),onCancel:()=>g(null),onConfirm:A})]})},ua=u.memo(({index:e,style:n,data:r})=>{const{customerCount:i,customers:a,hasWriteAccess:d,isSelectionActive:l,onCancelOnboarding:c,onRequestAction:p,onRowClick:m,onToggleTenantSelection:x,selectedTenantIdSet:g}=r,h=a[e],C=g.has(h.tenantId),b=e===i-1,[S,y]=u.useState(!1),j=u.useRef(null),[f,E]=u.useState({top:0,right:0}),$=h.enrollment?.status??"unknown",A=h.averageAccuracy,I=A>0?`${(A*100).toFixed(1)}${ho.percentage}`:ho.emDash;return u.useEffect(()=>{if(S&&j.current!=null){const w=j.current.getBoundingClientRect();E({top:w.bottom,right:window.innerWidth-w.right})}},[S]),u.useEffect(()=>{if(!S)return;const w=()=>y(!1);return document.addEventListener("click",w),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{document.removeEventListener("click",w),window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}},[S]),u.useEffect(()=>{l&&S&&y(!1)},[l,S]),o.jsxRuntimeExports.jsxs(Df,{style:n,$isSelected:C,onClick:()=>m(h),children:[d&&o.jsxRuntimeExports.jsx(Nf,{$hideBorder:b,onClick:w=>w.stopPropagation(),children:o.jsxRuntimeExports.jsx(o.Checkbox,{size:"small",checked:C,onChange:()=>x(h.tenantId)})}),o.jsxRuntimeExports.jsx(Mf,{$hideBorder:b,children:o.jsxRuntimeExports.jsxs("div",{children:[o.jsxRuntimeExports.jsx(_f,{children:h.companyName.length>0?h.companyName:h.companyId}),o.jsxRuntimeExports.jsx(Vf,{children:h.tenantId})]})}),o.jsxRuntimeExports.jsx(zf,{$hideBorder:b,children:o.jsxRuntimeExports.jsx(Uf,{status:$,children:da($)})}),o.jsxRuntimeExports.jsx(Hn,{$hideBorder:b,children:h.bookcloseDate!=null?h.bookcloseDate.format(Mr.visual.MMMDCommaYYYYformat):ho.emDash}),o.jsxRuntimeExports.jsx(Hn,{$hideBorder:b,title:h.enrollment?.latestTraining!=null?h.enrollment.latestTraining.format(zr.hmmADashDDMMMCommaYYYY):void 0,children:h.enrollment?.latestTraining!=null?h.enrollment.latestTraining.format(Mr.visual.MMMDCommaYYYYformat):ho.emDash}),o.jsxRuntimeExports.jsx(Hn,{$hideBorder:b,title:h.enrollment?.latestTransactionSync!=null?h.enrollment.latestTransactionSync.local().format(zr.hmmADashDDMMMCommaYYYY):void 0,children:h.enrollment?.latestTransactionSync!=null?h.enrollment.latestTransactionSync.utc(!0).fromNow():ho.emDash}),o.jsxRuntimeExports.jsx(Ff,{$hideBorder:b,children:I}),o.jsxRuntimeExports.jsx(Bf,{$hideBorder:b,children:d&&!l&&o.jsxRuntimeExports.jsxs(Hf,{onClick:w=>w.stopPropagation(),children:[o.jsxRuntimeExports.jsx(Kf,{ref:j,onClick:()=>y(!S),children:o.jsxRuntimeExports.jsx(t.SvgMore,{width:ge.menuIconSize,height:ge.menuIconSize})}),S&&Po.createPortal(o.jsxRuntimeExports.jsx(Gf,{style:{top:f.top,right:f.right},children:Es($).map(w=>o.jsxRuntimeExports.jsx(Yf,{onClick:()=>{y(!1),w.operationType==="cancel_onboarding"?c(h):p(h,w.operationType)},children:hs.actions[w.labelKey]},w.operationType))}),document.body)]})})]})});ua.displayName="AiAccountantCustomerListItem";const vf=u.forwardRef(({style:e,...n},r)=>o.jsxRuntimeExports.jsx("div",{ref:r,style:{...e,position:"relative"},...n})),wf=s.div`
|
|
3209
3212
|
position: relative;
|
|
3210
3213
|
flex: 1;
|
|
3211
3214
|
min-height: 0;
|
|
@@ -3230,7 +3233,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3230
3233
|
pointer-events: none;
|
|
3231
3234
|
z-index: 10;
|
|
3232
3235
|
}
|
|
3233
|
-
`,
|
|
3236
|
+
`,kf=s.div`
|
|
3234
3237
|
display: flex;
|
|
3235
3238
|
flex-direction: row;
|
|
3236
3239
|
align-items: stretch;
|
|
@@ -3240,7 +3243,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3240
3243
|
position: sticky;
|
|
3241
3244
|
top: 0;
|
|
3242
3245
|
z-index: 1;
|
|
3243
|
-
`,
|
|
3246
|
+
`,Tf=s.div`
|
|
3244
3247
|
flex: ${e=>e.$growToFill===!0?"1 1 auto":"0 0 auto"};
|
|
3245
3248
|
min-width: ${e=>e.$width}px;
|
|
3246
3249
|
width: ${e=>e.$growToFill===!0?"auto":`${e.$width}px`};
|
|
@@ -3251,11 +3254,11 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3251
3254
|
justify-content: ${e=>e.$justifyContent};
|
|
3252
3255
|
border-bottom: 1px solid ${e=>e.theme.colors.grey2};
|
|
3253
3256
|
color: ${e=>e.theme.colors.hero};
|
|
3254
|
-
height: ${
|
|
3255
|
-
`,
|
|
3257
|
+
height: ${ge.headerHeightPx}px;
|
|
3258
|
+
`,Pf=s(t.ExtraSmallSemiBold)`
|
|
3256
3259
|
display: flex;
|
|
3257
3260
|
align-items: center;
|
|
3258
|
-
`,
|
|
3261
|
+
`,If=s.button`
|
|
3259
3262
|
display: inline-flex;
|
|
3260
3263
|
align-items: center;
|
|
3261
3264
|
border: none;
|
|
@@ -3265,17 +3268,17 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3265
3268
|
font: inherit;
|
|
3266
3269
|
text-align: inherit;
|
|
3267
3270
|
color: ${e=>e.$active?e.theme.colors.primary:"inherit"};
|
|
3268
|
-
`,
|
|
3271
|
+
`,Lf=s.span`
|
|
3269
3272
|
display: inline-flex;
|
|
3270
3273
|
align-items: center;
|
|
3271
3274
|
margin-left: ${t.Space.sp1};
|
|
3272
3275
|
transform: rotate(
|
|
3273
3276
|
${e=>e.$direction==="desc"?"180deg":"0deg"}
|
|
3274
3277
|
);
|
|
3275
|
-
`,
|
|
3278
|
+
`,Af=s.div`
|
|
3276
3279
|
flex: 1;
|
|
3277
3280
|
min-height: 0;
|
|
3278
|
-
`,
|
|
3281
|
+
`,Df=s.div`
|
|
3279
3282
|
display: flex;
|
|
3280
3283
|
flex-direction: row;
|
|
3281
3284
|
align-items: stretch;
|
|
@@ -3290,26 +3293,26 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3290
3293
|
background: ${e=>e.theme.colors.background};
|
|
3291
3294
|
color: ${e=>e.theme.colors.primary};
|
|
3292
3295
|
}
|
|
3293
|
-
`,
|
|
3296
|
+
`,Of=s.div`
|
|
3294
3297
|
flex: 0 0 auto;
|
|
3295
|
-
width: ${
|
|
3296
|
-
min-width: ${
|
|
3298
|
+
width: ${ge.checkboxColumnWidthPx}px;
|
|
3299
|
+
min-width: ${ge.checkboxColumnWidthPx}px;
|
|
3297
3300
|
box-sizing: border-box;
|
|
3298
3301
|
display: flex;
|
|
3299
3302
|
align-items: center;
|
|
3300
3303
|
justify-content: center;
|
|
3301
3304
|
border-bottom: 1px solid ${e=>e.theme.colors.grey2};
|
|
3302
|
-
height: ${
|
|
3303
|
-
`,
|
|
3305
|
+
height: ${ge.headerHeightPx}px;
|
|
3306
|
+
`,Nf=s.div`
|
|
3304
3307
|
flex: 0 0 auto;
|
|
3305
|
-
width: ${
|
|
3306
|
-
min-width: ${
|
|
3308
|
+
width: ${ge.checkboxColumnWidthPx}px;
|
|
3309
|
+
min-width: ${ge.checkboxColumnWidthPx}px;
|
|
3307
3310
|
box-sizing: border-box;
|
|
3308
3311
|
display: flex;
|
|
3309
3312
|
align-items: center;
|
|
3310
3313
|
justify-content: center;
|
|
3311
3314
|
border-bottom: ${e=>e.$hideBorder===!0?"none":`1px solid ${e.theme.colors.grey2}`};
|
|
3312
|
-
min-height: ${
|
|
3315
|
+
min-height: ${ge.rowHeightPx}px;
|
|
3313
3316
|
`,Io=s.div`
|
|
3314
3317
|
flex: 0 0 auto;
|
|
3315
3318
|
box-sizing: border-box;
|
|
@@ -3318,37 +3321,37 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3318
3321
|
align-items: center;
|
|
3319
3322
|
overflow: hidden;
|
|
3320
3323
|
border-bottom: ${e=>e.$hideBorder===!0?"none":`1px solid ${e.theme.colors.grey2}`};
|
|
3321
|
-
min-height: ${
|
|
3322
|
-
`,
|
|
3324
|
+
min-height: ${ge.rowHeightPx}px;
|
|
3325
|
+
`,Mf=s(Io)`
|
|
3323
3326
|
flex: 1 1 auto;
|
|
3324
3327
|
min-width: ${ot.companyName}px;
|
|
3325
|
-
`,
|
|
3328
|
+
`,zf=s(Io)`
|
|
3326
3329
|
width: ${ot.status}px;
|
|
3327
3330
|
`,Hn=s(Io)`
|
|
3328
3331
|
width: ${ot.bookcloseDate}px;
|
|
3329
|
-
`,
|
|
3332
|
+
`,Ff=s(Io)`
|
|
3330
3333
|
width: ${ot.accuracy}px;
|
|
3331
3334
|
justify-content: flex-end;
|
|
3332
|
-
`,
|
|
3335
|
+
`,Bf=s(Io)`
|
|
3333
3336
|
width: ${ot.actions}px;
|
|
3334
3337
|
justify-content: center;
|
|
3335
3338
|
overflow: visible;
|
|
3336
|
-
`,
|
|
3339
|
+
`,Wf=s.div`
|
|
3337
3340
|
padding: ${t.Space.sp8};
|
|
3338
3341
|
text-align: center;
|
|
3339
3342
|
color: ${e=>e.theme.colors.grey1};
|
|
3340
|
-
`,
|
|
3343
|
+
`,_f=s(t.StandardSemiBold)``,Vf=s(t.SmallRegular)`
|
|
3341
3344
|
color: ${e=>e.theme.colors.grey1};
|
|
3342
|
-
`,Zo={active:"tagSuccess",pending:"tagWarning",onboarding:"tagInfo",offboarding:"tagWarning",offboarded:"tagDefault",failed:"tagAttention",error:"tagAttention",unknown:"tagDefault"},
|
|
3345
|
+
`,Zo={active:"tagSuccess",pending:"tagWarning",onboarding:"tagInfo",offboarding:"tagWarning",offboarded:"tagDefault",failed:"tagAttention",error:"tagAttention",unknown:"tagDefault"},Uf=s(t.ExtraSmallSemiBold)`
|
|
3343
3346
|
display: inline-block;
|
|
3344
|
-
padding: ${
|
|
3347
|
+
padding: ${ge.statusBadgeVerticalPadding} ${t.Space.sp2};
|
|
3345
3348
|
border-radius: ${t.Space.sp2};
|
|
3346
3349
|
text-transform: capitalize;
|
|
3347
3350
|
background-color: ${e=>e.theme.colors[`${Zo[e.status]??Zo.unknown}Bg`]};
|
|
3348
3351
|
color: ${e=>e.theme.colors[`${Zo[e.status]??Zo.unknown}Color`]};
|
|
3349
|
-
`,
|
|
3352
|
+
`,Hf=s.div`
|
|
3350
3353
|
position: relative;
|
|
3351
|
-
`,
|
|
3354
|
+
`,Kf=s.button`
|
|
3352
3355
|
background: none;
|
|
3353
3356
|
border: none;
|
|
3354
3357
|
cursor: pointer;
|
|
@@ -3357,30 +3360,30 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3357
3360
|
align-items: center;
|
|
3358
3361
|
justify-content: center;
|
|
3359
3362
|
color: ${e=>e.theme.colors.champion};
|
|
3360
|
-
`,
|
|
3363
|
+
`,Gf=s.div`
|
|
3361
3364
|
position: fixed;
|
|
3362
|
-
min-width: ${
|
|
3365
|
+
min-width: ${ge.menuDropdownMinWidthPx}px;
|
|
3363
3366
|
background-color: ${e=>e.theme.colors.background};
|
|
3364
3367
|
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
3365
3368
|
border-radius: ${t.Space.sp1};
|
|
3366
3369
|
box-shadow: ${e=>e.theme.colors.dropShadowNormal};
|
|
3367
3370
|
z-index: 9999;
|
|
3368
|
-
`,
|
|
3371
|
+
`,Yf=s.div`
|
|
3369
3372
|
padding: ${t.Space.sp2} ${t.Space.sp3};
|
|
3370
3373
|
cursor: pointer;
|
|
3371
3374
|
&:hover {
|
|
3372
3375
|
background-color: ${e=>e.theme.colors.grey5};
|
|
3373
3376
|
}
|
|
3374
|
-
`,go={summaryCardCount:4,tableRowCount:8,labelLoaderWidth:t.Space.sp11,valueLoaderWidthPx:50,valueLoaderHeightPx:20},
|
|
3377
|
+
`,go={summaryCardCount:4,tableRowCount:8,labelLoaderWidth:t.Space.sp11,valueLoaderWidthPx:50,valueLoaderHeightPx:20},Zf=[25,12,13,13,13,12,12],Xf=()=>o.jsxRuntimeExports.jsxs(qf,{children:[o.jsxRuntimeExports.jsx(Qf,{children:Array.from({length:go.summaryCardCount},(e,n)=>o.jsxRuntimeExports.jsxs(Jf,{children:[o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:go.labelLoaderWidth,height:ge.skeletonLoaderHeightPx}),o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:go.valueLoaderWidthPx,height:go.valueLoaderHeightPx})]},`card-${n}`))}),o.jsxRuntimeExports.jsx(t.ListTableSkeleton,{colPcts:Zf,rowCount:go.tableRowCount})]}),qf=s.div`
|
|
3375
3378
|
display: flex;
|
|
3376
3379
|
flex-direction: column;
|
|
3377
3380
|
flex: 1;
|
|
3378
3381
|
min-height: 0;
|
|
3379
|
-
`,
|
|
3382
|
+
`,Qf=s.div`
|
|
3380
3383
|
display: flex;
|
|
3381
3384
|
gap: ${t.Space.sp3};
|
|
3382
3385
|
margin-bottom: ${t.Space.sp4};
|
|
3383
|
-
`,
|
|
3386
|
+
`,Jf=s.div`
|
|
3384
3387
|
flex: 1;
|
|
3385
3388
|
display: flex;
|
|
3386
3389
|
flex-direction: column;
|
|
@@ -3391,7 +3394,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3391
3394
|
border-radius: ${t.Space.sp2};
|
|
3392
3395
|
padding: ${t.Space.sp4};
|
|
3393
3396
|
box-sizing: border-box;
|
|
3394
|
-
`,{common:{strings:Fr},aiAccountantCustomer:Xo}=t.appLocale.getLocalizedStrings(),
|
|
3397
|
+
`,{common:{strings:Fr},aiAccountantCustomer:Xo}=t.appLocale.getLocalizedStrings(),e0=({averageAccuracy:e,customers:n})=>{const r=n.length,i=n.filter(l=>l.enrollment?.status==="active").length,a=n.filter(l=>{const c=l.enrollment?.status;return c==="pending"||c==="onboarding"||c==="offboarding"}).length,d=e>0?`${(e*100).toFixed(1)}${Fr.percentage}`:Fr.emDash;return o.jsxRuntimeExports.jsxs(t0,{children:[o.jsxRuntimeExports.jsxs(qo,{children:[o.jsxRuntimeExports.jsx(Qo,{children:Xo.summary.totalCustomers}),o.jsxRuntimeExports.jsx(Jo,{children:r})]}),o.jsxRuntimeExports.jsxs(qo,{children:[o.jsxRuntimeExports.jsx(Qo,{children:Xo.summary.active}),o.jsxRuntimeExports.jsx(Jo,{children:i})]}),o.jsxRuntimeExports.jsxs(qo,{children:[o.jsxRuntimeExports.jsx(Qo,{children:Xo.summary.inProgress}),o.jsxRuntimeExports.jsx(Jo,{children:a})]}),o.jsxRuntimeExports.jsxs(qo,{children:[o.jsxRuntimeExports.jsx(Qo,{children:Xo.summary.avgAccuracy}),o.jsxRuntimeExports.jsx(Jo,{children:d})]})]})},t0=s.div`
|
|
3395
3398
|
display: flex;
|
|
3396
3399
|
flex-direction: row;
|
|
3397
3400
|
gap: ${t.Space.sp3};
|
|
@@ -3415,35 +3418,35 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3415
3418
|
`,Jo=s(t.LargeSemiBold)`
|
|
3416
3419
|
color: ${e=>e.theme.colors.primary};
|
|
3417
3420
|
margin-top: ${t.Space.sp2};
|
|
3418
|
-
`,
|
|
3419
|
-
height: calc(100vh - ${
|
|
3421
|
+
`,o0=t.appLocale.getLocalizedStrings().common,{aiAccountantCustomer:Ze}=t.appLocale.getLocalizedStrings(),n0="evaluate",s0=[{label:Ze.filters.enrollmentStatus.active,value:"active"},{label:Ze.filters.enrollmentStatus.pending,value:"pending"},{label:Ze.filters.enrollmentStatus.onboarding,value:"onboarding"},{label:Ze.filters.enrollmentStatus.offboarded,value:"offboarded"},{label:Ze.filters.enrollmentStatus.failed,value:"failed"}],r0=()=>({enrollmentStatus:s0}),i0=({headerData:e,headerActions:n,aiAccountantPageActions:r,aiAccountantPageData:i})=>{const a=t.useWindowSizeContext(),d=vs(),{aiAccountantView:l}=i,{onAction:c,onBulkAction:p,onCancelOnboarding:m,onClearSelection:x,onCockpitReloadData:g,onColumnSortConfigChanged:h,onCustomerSelected:C,onEvaluateAll:b,onFilterTextChanged:S,onFiltersChange:y,onToggleAllVisible:j,onToggleTenantSelection:f}=r,E=l.fetchState==="Completed",$=l.fetchState==="In-Progress"||l.fetchState==="Not-Started",A=l.fetchState==="Error",I=l.triggerJobStatus.fetchState==="In-Progress",w=l.selectedTenantIds,k=w.length,N=l.unonboardedTenantIds.length,D=k>0,G=u.useMemo(()=>{if(!D)return[];const F=l.selectedCustomersForJobTrigger.map(_=>Es(_.enrollment?.status??"unknown"));if(F.length===0)return[];const[K,...H]=F;return K.filter(_=>_.operationType!=="cancel_onboarding"&&H.every(oe=>oe.some(ne=>ne.operationType===_.operationType)))},[D,l.selectedCustomersForJobTrigger]),[O,Z]=u.useState(!1),q=u.useRef(null),[R,T]=u.useState({top:0,right:0});u.useEffect(()=>{if(O&&q.current!=null){const F=q.current.getBoundingClientRect();T({top:F.bottom,right:window.innerWidth-F.right})}},[O]),u.useEffect(()=>{if(!O)return;const F=()=>Z(!1);return document.addEventListener("click",F),window.addEventListener("scroll",F,!0),window.addEventListener("resize",F),()=>{document.removeEventListener("click",F),window.removeEventListener("scroll",F,!0),window.removeEventListener("resize",F)}},[O]);const[V,W]=u.useState(null),v=()=>{N===0||I||W({mode:"evaluateAll",count:N})},L=F=>{Z(!1),W({mode:"bulk",operationType:F.operationType,operationLabel:Ze.actions[F.labelKey],count:k})},J=(F,K,H)=>{V!=null&&(V.mode==="evaluateAll"?b(K,H):p(F,K,H),W(null))},re=D||N===0||I;return o.jsxRuntimeExports.jsxs(a0,{children:[o.jsxRuntimeExports.jsx(dt,{headerActions:{...n,filterActions:{onFilterTextChanged:(F,K)=>{S(K)},getCategoryWiseOptions:r0,onFiltersChange:y}},headerData:{...e,allTabOptions:e.allTabOptions??it,companiesLoaded:E,filterData:{filterText:l.uiState.filterText,filters:l.uiState.filters},selectedTabOption:"aiAccountant"}}),o.jsxRuntimeExports.jsx(l0,{windowSize:a,children:$?o.jsxRuntimeExports.jsx(Xf,{}):A?o.jsxRuntimeExports.jsx($t,{onCockpitReloadData:g,selectedCockpitOption:"aiAccountant"}):o.jsxRuntimeExports.jsxs(f0,{children:[o.jsxRuntimeExports.jsxs(c0,{children:[o.jsxRuntimeExports.jsx(d0,{children:D&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(u0,{children:Ze.bulkActions.selectedCount.replace("__count__",String(k))}),o.jsxRuntimeExports.jsx(m0,{type:"button",onClick:x,children:o0.clear})]})}),o.jsxRuntimeExports.jsxs(p0,{children:[o.jsxRuntimeExports.jsx(ff,{isEnabled:!$,spinRefreshIcon:$,onClick:()=>g("aiAccountant")}),d&&!D&&o.jsxRuntimeExports.jsx(t.Button,{label:Ze.summary.evaluateAll,variant:"primary",size:"small",disabled:re,onClick:v}),d&&D&&o.jsxRuntimeExports.jsxs(x0,{children:[o.jsxRuntimeExports.jsxs(h0,{ref:q,onClick:F=>F.stopPropagation(),children:[o.jsxRuntimeExports.jsx(t.Button,{label:Ze.bulkActions.menuLabel,variant:"primary",size:"small",disabled:G.length===0||I,onClick:()=>Z(!O)}),O&&G.length>0&&Po.createPortal(o.jsxRuntimeExports.jsx(S0,{style:{top:R.top,right:R.right},children:G.map(F=>o.jsxRuntimeExports.jsx(y0,{onClick:()=>L(F),children:Ze.actions[F.labelKey]},F.operationType))}),document.body)]}),G.length===0&&o.jsxRuntimeExports.jsx(g0,{children:Ze.bulkActions.disabledInfo})]})]})]}),o.jsxRuntimeExports.jsx(e0,{averageAccuracy:l.averageAccuracy,customers:l.customers}),o.jsxRuntimeExports.jsx(Ef,{customers:l.customers,sortKey:l.uiState.sortKey,sortOrder:l.uiState.sortOrder,selectedTenantIds:w,onColumnSortConfigChanged:h,onRowClick:C,onAction:c,onCancelOnboarding:m,onToggleAllVisible:j,onToggleTenantSelection:f})]})}),V!=null&&o.jsxRuntimeExports.jsx(Rs,{operationType:V.mode==="evaluateAll"?n0:V.operationType,dialogTitle:V.mode==="evaluateAll"?Ze.bulkActions.evaluateAllDialogTitle:V.operationLabel,dialogDescription:V.mode==="evaluateAll"?Ze.bulkActions.evaluateAllDialogDescription.replace("__count__",String(V.count)):V.operationType==="offboard"?Ze.bulkActions.bulkDialogDescriptionOffboard.replace("__count__",String(V.count)):Ze.bulkActions.bulkDialogDescription.replace("__count__",String(V.count)).replace("__action__",V.operationLabel),onCancel:()=>W(null),onConfirm:J})]})},a0=s.div`
|
|
3422
|
+
height: calc(100vh - ${ge.globalNavBarHeightPx}px);
|
|
3420
3423
|
overflow-y: hidden;
|
|
3421
3424
|
background-color: ${e=>e.theme.colors.grey4};
|
|
3422
|
-
`,
|
|
3423
|
-
height: calc(100% - ${
|
|
3425
|
+
`,l0=s.div`
|
|
3426
|
+
height: calc(100% - ${ge.pageHeaderHeightPx}px);
|
|
3424
3427
|
display: flex;
|
|
3425
3428
|
flex-direction: column;
|
|
3426
3429
|
padding: ${e=>`${t.Space.sp4} ${He.cockpitLeftPadding.valuePx(e.windowSize)} ${t.Space.sp0} ${He.cockpitLeftPadding.valuePx(e.windowSize)}`};
|
|
3427
|
-
`,
|
|
3430
|
+
`,c0=s.div`
|
|
3428
3431
|
display: flex;
|
|
3429
3432
|
flex-direction: row;
|
|
3430
3433
|
align-items: center;
|
|
3431
3434
|
justify-content: space-between;
|
|
3432
3435
|
gap: ${t.Space.sp3};
|
|
3433
3436
|
margin-bottom: ${t.Space.sp3};
|
|
3434
|
-
`,
|
|
3437
|
+
`,d0=s.div`
|
|
3435
3438
|
display: flex;
|
|
3436
3439
|
flex-direction: row;
|
|
3437
3440
|
align-items: center;
|
|
3438
3441
|
gap: ${t.Space.sp2};
|
|
3439
|
-
`,
|
|
3442
|
+
`,p0=s.div`
|
|
3440
3443
|
display: flex;
|
|
3441
3444
|
flex-direction: row;
|
|
3442
3445
|
align-items: center;
|
|
3443
3446
|
gap: ${t.Space.sp2};
|
|
3444
|
-
`,
|
|
3447
|
+
`,u0=s(t.ExtraSmallSemiBold)`
|
|
3445
3448
|
color: ${e=>e.theme.colors.champion};
|
|
3446
|
-
`,
|
|
3449
|
+
`,m0=s.button`
|
|
3447
3450
|
background: none;
|
|
3448
3451
|
border: none;
|
|
3449
3452
|
padding: 0;
|
|
@@ -3453,37 +3456,37 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3453
3456
|
&:hover {
|
|
3454
3457
|
text-decoration: underline;
|
|
3455
3458
|
}
|
|
3456
|
-
`,
|
|
3459
|
+
`,x0=s.div`
|
|
3457
3460
|
display: flex;
|
|
3458
3461
|
flex-direction: column;
|
|
3459
3462
|
align-items: flex-end;
|
|
3460
3463
|
gap: ${t.Space.sp1};
|
|
3461
|
-
`,
|
|
3464
|
+
`,h0=s.div`
|
|
3462
3465
|
position: relative;
|
|
3463
|
-
`,
|
|
3466
|
+
`,g0=s(t.SmallRegular)`
|
|
3464
3467
|
color: ${e=>e.theme.colors.hero};
|
|
3465
3468
|
max-width: 260px;
|
|
3466
3469
|
text-align: right;
|
|
3467
|
-
`,
|
|
3470
|
+
`,S0=s.div`
|
|
3468
3471
|
position: fixed;
|
|
3469
|
-
min-width: ${
|
|
3472
|
+
min-width: ${ge.menuDropdownMinWidthPx}px;
|
|
3470
3473
|
background-color: ${e=>e.theme.colors.background};
|
|
3471
3474
|
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
3472
3475
|
border-radius: ${t.Space.sp1};
|
|
3473
3476
|
box-shadow: ${e=>e.theme.colors.dropShadowNormal};
|
|
3474
3477
|
z-index: 9999;
|
|
3475
|
-
`,
|
|
3478
|
+
`,y0=s.div`
|
|
3476
3479
|
padding: ${t.Space.sp2} ${t.Space.sp3};
|
|
3477
3480
|
cursor: pointer;
|
|
3478
3481
|
&:hover {
|
|
3479
3482
|
background-color: ${e=>e.theme.colors.grey5};
|
|
3480
3483
|
}
|
|
3481
|
-
`,
|
|
3484
|
+
`,f0=s.div`
|
|
3482
3485
|
display: flex;
|
|
3483
3486
|
flex-direction: column;
|
|
3484
3487
|
flex: 1;
|
|
3485
3488
|
min-height: 0;
|
|
3486
|
-
`,Pt={1:12,2:64,3:95};function
|
|
3489
|
+
`,Pt={1:12,2:64,3:95};function C0({qboConnectionPool:e,isLoading:n,onQBOConnectClick:r}){const i=t.appLocale.getLocalizedStrings().cockpit.onboarding.qboSetupAutomated;return o.jsxRuntimeExports.jsx(j0,{children:o.jsxRuntimeExports.jsx(b0,{children:o.jsxRuntimeExports.jsxs(R0,{children:[n===!0?o.jsxRuntimeExports.jsx(Br,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:154,height:t.sp[4]})}):o.jsxRuntimeExports.jsx(Br,{children:i.qboSectionText}),o.jsxRuntimeExports.jsxs($0,{children:[o.jsxRuntimeExports.jsxs(Kn,{minWidth:t.Space.sp9,children:[n===!0?o.jsxRuntimeExports.jsx(Zt,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:Pt[1],height:t.sp[3]})}):o.jsxRuntimeExports.jsx(Zt,{children:e.essentialConnectionsCount}),n===!0?o.jsxRuntimeExports.jsx(It,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:Pt[2],height:t.sp[3]})}):o.jsxRuntimeExports.jsx(It,{children:i.typeOfQBOAccount.essentials})]}),o.jsxRuntimeExports.jsxs(Kn,{minWidth:"28px",children:[n===!0?o.jsxRuntimeExports.jsx(Zt,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:Pt[1],height:t.sp[3]})}):o.jsxRuntimeExports.jsx(Zt,{children:e.plusConnectionsCount}),n===!0?o.jsxRuntimeExports.jsx(It,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:Pt[2],height:t.sp[3]})}):o.jsxRuntimeExports.jsx(It,{children:i.typeOfQBOAccount.plus})]}),o.jsxRuntimeExports.jsxs(Kn,{minWidth:"62px",children:[n===!0?o.jsxRuntimeExports.jsx(Zt,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:Pt[1],height:t.sp[3]})}):o.jsxRuntimeExports.jsx(Zt,{children:e.advanceConnectionsCount}),n===!0?o.jsxRuntimeExports.jsx(It,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:Pt[2],height:t.sp[3]})}):o.jsxRuntimeExports.jsx(It,{children:i.typeOfQBOAccount.advanced})]})]}),n===!0?o.jsxRuntimeExports.jsx(Wr,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:Pt[3],height:t.sp[4]})}):o.jsxRuntimeExports.jsxs(Wr,{onClick:()=>{r()},children:[o.jsxRuntimeExports.jsx(E0,{className:"setupQbo"}),o.jsxRuntimeExports.jsx(It,{className:"setupQbo",children:i.setupQBO})]})]})})})}const j0=s.div`
|
|
3487
3490
|
z-index: 2;
|
|
3488
3491
|
display: flex;
|
|
3489
3492
|
flex-direction: column;
|
|
@@ -3502,9 +3505,9 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3502
3505
|
}
|
|
3503
3506
|
outline-color: ${e=>e.theme.colors.primary};
|
|
3504
3507
|
}
|
|
3505
|
-
`,
|
|
3508
|
+
`,b0=s.div`
|
|
3506
3509
|
padding: ${t.Space.sp3};
|
|
3507
|
-
`,
|
|
3510
|
+
`,R0=s.div`
|
|
3508
3511
|
display: flex;
|
|
3509
3512
|
justify-content: space-between;
|
|
3510
3513
|
row-gap: ${t.Space.sp2};
|
|
@@ -3515,7 +3518,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3515
3518
|
color: ${e=>e.theme.colors.primary};
|
|
3516
3519
|
min-width: 154px;
|
|
3517
3520
|
margin-right: ${t.Space.sp6};
|
|
3518
|
-
`,$
|
|
3521
|
+
`,$0=s.div`
|
|
3519
3522
|
display: flex;
|
|
3520
3523
|
width: fit-content;
|
|
3521
3524
|
flex-direction: row;
|
|
@@ -3541,7 +3544,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3541
3544
|
color: ${e=>e.theme.colors.primary};
|
|
3542
3545
|
}
|
|
3543
3546
|
cursor: pointer;
|
|
3544
|
-
`,
|
|
3547
|
+
`,E0=s(t.SvgOpenLink)`
|
|
3545
3548
|
display: flex;
|
|
3546
3549
|
width: ${t.Space.sp3};
|
|
3547
3550
|
height: ${t.Space.sp3};
|
|
@@ -3550,7 +3553,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3550
3553
|
color: ${e=>e.theme.colors.hero};
|
|
3551
3554
|
`,It=s(t.SmallRegular)`
|
|
3552
3555
|
color: ${e=>e.theme.colors.hero};
|
|
3553
|
-
`,
|
|
3556
|
+
`,v0=t.appLocale.getLocalizedStrings().common,w0=s.div`
|
|
3554
3557
|
display: flex;
|
|
3555
3558
|
flex-direction: column;
|
|
3556
3559
|
justify-content: space-between;
|
|
@@ -3566,15 +3569,15 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3566
3569
|
border: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
3567
3570
|
outline: none;
|
|
3568
3571
|
width: fit-content;
|
|
3569
|
-
`,
|
|
3572
|
+
`,k0=s(t.H6Regular)`
|
|
3570
3573
|
margin-top: ${t.Space.sp7};
|
|
3571
3574
|
color: ${e=>e.theme.colors.primary};
|
|
3572
|
-
`,
|
|
3575
|
+
`,T0=s(t.StandardRegularSp)`
|
|
3573
3576
|
color: ${e=>e.theme.colors.hero};
|
|
3574
3577
|
padding-left: ${t.Space.sp8};
|
|
3575
3578
|
padding-right: ${t.Space.sp8};
|
|
3576
3579
|
margin-top: ${t.Space.sp4};
|
|
3577
|
-
`,
|
|
3580
|
+
`,P0=s.ol`
|
|
3578
3581
|
color: ${e=>e.theme.colors.hero};
|
|
3579
3582
|
padding-left: ${t.Space.sp11};
|
|
3580
3583
|
padding-right: ${t.Space.sp8};
|
|
@@ -3582,11 +3585,11 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3582
3585
|
white-space: pre-line;
|
|
3583
3586
|
text-align: left;
|
|
3584
3587
|
width: ${e=>e.windowSize==="small"?"auto":"432px"};
|
|
3585
|
-
`,en=s(t.StandardRegularLi)``,
|
|
3588
|
+
`,en=s(t.StandardRegularLi)``,I0=s.hr`
|
|
3586
3589
|
width: 100%;
|
|
3587
3590
|
border: 0.2px solid ${e=>e.theme.colors.grey3};
|
|
3588
3591
|
margin-top: auto;
|
|
3589
|
-
`;function
|
|
3592
|
+
`;function L0(e){const{onCancelClick:n,onGoLiveClick:r,showGoLivePopup:i,loading:a}=e,d=t.appLocale.getLocalizedStrings().cockpit.onboarding,l=t.useWindowSizeContext();return o.jsxRuntimeExports.jsx(o.Modal,{"aria-labelledby":"modal-title","aria-describedby":"modal-description",open:i,BackdropProps:{style:{backgroundColor:t.Colors.modalBackground}},children:o.jsxRuntimeExports.jsxs(w0,{children:[o.jsxRuntimeExports.jsx(k0,{children:d.goLiveTitle}),o.jsxRuntimeExports.jsx(T0,{children:d.goLiveDescription}),o.jsxRuntimeExports.jsxs(P0,{windowSize:l,children:[o.jsxRuntimeExports.jsx(en,{children:d.goLiveSteps.stepOne}),o.jsxRuntimeExports.jsx(en,{children:d.goLiveSteps.stepTwo}),o.jsxRuntimeExports.jsx(en,{children:d.goLiveSteps.stepThree}),o.jsxRuntimeExports.jsx(en,{children:d.goLiveSteps.stepFour})]}),o.jsxRuntimeExports.jsx(I0,{}),o.jsxRuntimeExports.jsxs(A0,{onClick:c=>c.stopPropagation(),children:[o.jsxRuntimeExports.jsx(t.Button,{label:v0.cancel,onClick:n,size:"standard",type:"reset",disabled:a}),o.jsxRuntimeExports.jsx(D0,{space:t.Space.sp3}),o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",label:d.goLiveText,loading:a,disabled:a,size:"standard",onClick:r})]})]})})}const A0=s.div`
|
|
3590
3593
|
display: flex;
|
|
3591
3594
|
bottom: 0;
|
|
3592
3595
|
left: 0;
|
|
@@ -3595,16 +3598,16 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3595
3598
|
justify-content: center;
|
|
3596
3599
|
background: ${e=>e.theme.colors.grey5};
|
|
3597
3600
|
padding: 10px ${t.Space.sp3};
|
|
3598
|
-
`,
|
|
3601
|
+
`,D0=s.div`
|
|
3599
3602
|
margin-right: ${e=>e.space};
|
|
3600
|
-
`,ma={maxWidth:new t.ResponsiveSized(280,322),contentMaxWidth:new t.ResponsiveSized(200,250)},
|
|
3603
|
+
`,ma={maxWidth:new t.ResponsiveSized(280,322),contentMaxWidth:new t.ResponsiveSized(200,250)},O0=ve.keyframes`
|
|
3601
3604
|
0% {
|
|
3602
3605
|
transform: translateX(100%)
|
|
3603
3606
|
}
|
|
3604
3607
|
100% {
|
|
3605
3608
|
transform: translateX(0)
|
|
3606
3609
|
}
|
|
3607
|
-
`,
|
|
3610
|
+
`,N0=s.div`
|
|
3608
3611
|
position: fixed;
|
|
3609
3612
|
top: ${t.Space.sp3};
|
|
3610
3613
|
right: ${t.Space.sp3};
|
|
@@ -3619,14 +3622,14 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3619
3622
|
flex-direction: row;
|
|
3620
3623
|
justify-content: center;
|
|
3621
3624
|
align-items: flex-start;
|
|
3622
|
-
animation: ${
|
|
3625
|
+
animation: ${O0} 0.4s;
|
|
3623
3626
|
`,_r=s(t.StandardRegularSp)`
|
|
3624
3627
|
color: ${t.Colors.neutralGrey2Light};
|
|
3625
3628
|
word-break: break-word;
|
|
3626
3629
|
`,Vr=s.div`
|
|
3627
3630
|
max-width: ${e=>ma.contentMaxWidth.valuePx(e.windowSize)};
|
|
3628
3631
|
margin: ${t.Space.sp0} 12px;
|
|
3629
|
-
`,
|
|
3632
|
+
`,M0=s.div`
|
|
3630
3633
|
margin-top: ${t.Space.sp1};
|
|
3631
3634
|
width: ${t.Space.sp3};
|
|
3632
3635
|
height: ${t.Space.sp3};
|
|
@@ -3638,13 +3641,13 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3638
3641
|
&:hover {
|
|
3639
3642
|
color: ${t.Colors.primaryDark};
|
|
3640
3643
|
}
|
|
3641
|
-
`,So=t.appLocale.getLocalizedStrings().cockpit.onboarding;function Ur(e){const n=t.useWindowSizeContext(),{customMessageText:r,onRemoveSnackbar:i,customerCreationType:a={stage:"none",type:"create"}}=e;u.useEffect(()=>{setTimeout(i,5e3)});const d=
|
|
3644
|
+
`,So=t.appLocale.getLocalizedStrings().cockpit.onboarding;function Ur(e){const n=t.useWindowSizeContext(),{customMessageText:r,onRemoveSnackbar:i,customerCreationType:a={stage:"none",type:"create"}}=e;u.useEffect(()=>{setTimeout(i,5e3)});const d=z0(a);return o.jsxRuntimeExports.jsxs(N0,{windowSize:n,children:[r?o.jsxRuntimeExports.jsx(Vr,{windowSize:n,children:o.jsxRuntimeExports.jsx(_r,{children:r})}):o.jsxRuntimeExports.jsx(Vr,{windowSize:n,children:o.jsxRuntimeExports.jsx(_r,{children:d})}),o.jsxRuntimeExports.jsx(M0,{onClick:i,children:o.jsxRuntimeExports.jsx(t.SvgClose,{})})]})}const z0=e=>{switch(e?.stage){case"both":return So.bothCreated;case"customer":return e?.type==="create"?So.customerCreated:So.customerUpdated;case"group":return So.groupCreated;case"company_details":return So.companyDetailsUpdated;default:return""}},mt=t.appLocale.getLocalizedStrings().cockpit.onboarding.header,zt=[{key:"companyName",value:mt.name,sortOrder:"ascending",width:new t.ResponsiveSized(344,344),isThreadAllowed:!0},{key:"groupCreated",value:mt.groupCreation,sortOrder:"ascending",width:new t.ResponsiveSized(288,288),isThreadAllowed:!0},{key:"customerCreated",value:mt.customerCreation,sortOrder:"ascending",width:new t.ResponsiveSized(288,288),isThreadAllowed:!0},{key:"bankAccountLinked",value:mt.setupPayment,sortOrder:"ascending",width:new t.ResponsiveSized(288,288),isThreadAllowed:!0},{key:"qboLinked",value:mt.connectToQBO,sortOrder:"ascending",width:new t.ResponsiveSized(288,288),isThreadAllowed:!0},{key:"identityVerified",value:mt.verifyIdentity,sortOrder:"ascending",width:new t.ResponsiveSized(288,288),isThreadAllowed:!0},{key:"businessVerified",value:mt.verifyBusiness,sortOrder:"ascending",width:new t.ResponsiveSized(288,288),isThreadAllowed:!0},{key:"enroller",value:mt.enroller,sortOrder:"ascending",width:new t.ResponsiveSized(220,220),isThreadAllowed:!0},{key:"invite",value:mt.invite,sortOrder:"ascending",width:new t.ResponsiveSized(180,180),isThreadAllowed:!0}];zt.map(e=>e.key);function F0({companyNameSticky:e,sortConfig:n,onColumnSortConfigChanged:r}){const i=t.useWindowSizeContext(),[a,d]=u.useState(o.cloneDeep(zt));u.useEffect(()=>{const c=[...a];for(const p of c)p.key===n.sortKey?p.sortOrder=n.sortOrder:p.sortOrder="ascending";d(c)},[n.sortKey,n.sortOrder]);const l=(c,p)=>{let m=p;n.sortKey===c&&(m=p==="ascending"?"descending":"ascending"),r(c,m)};return o.jsxRuntimeExports.jsx(_0,{height:Ft,children:a.map(c=>o.jsxRuntimeExports.jsxs(V0,{companyNameSticky:e&&c.key==="companyName",sortDataValue:n.sortKey,actualDataValue:c.key,wrapperWidth:c.width,windowSize:i,children:[o.jsxRuntimeExports.jsxs(K0,{onClick:()=>l(ee.toOnboardingSortKeyType(c.key),c.sortOrder),children:[o.jsxRuntimeExports.jsx(t.ExtraSmallRegular,{children:c.value}),o.jsxRuntimeExports.jsx(W0,{sortDataValue:n.sortKey,headerdata:c,children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:12,height:12})})]}),o.jsxRuntimeExports.jsx(H0,{isVisible:n.sortKey===c.key,children:o.jsxRuntimeExports.jsx(U0,{onClick:()=>l("latestCreated","descending")})})]},c.key))})}const B0=u.memo(F0),W0=s.div`
|
|
3642
3645
|
display: flex;
|
|
3643
3646
|
align-items: center;
|
|
3644
3647
|
transform: ${e=>e.sortDataValue===e.headerdata.key&&e.headerdata.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
3645
3648
|
|
|
3646
3649
|
${e=>e.headerdata.sortOrder==="ascending"?"padding-top: 2px":"padding-bottom: 2px"}
|
|
3647
|
-
`,
|
|
3650
|
+
`,_0=s(t.SmallRegular)`
|
|
3648
3651
|
top: 0;
|
|
3649
3652
|
left: 0;
|
|
3650
3653
|
width: fit-content;
|
|
@@ -3657,7 +3660,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3657
3660
|
padding: ${t.Space.sp3} ${t.Space.sp4} ${t.Space.sp3} ${t.Space.sp0};
|
|
3658
3661
|
position: sticky;
|
|
3659
3662
|
color: ${e=>e.theme.colors.grey1};
|
|
3660
|
-
`,
|
|
3663
|
+
`,V0=s.div`
|
|
3661
3664
|
color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.hero};
|
|
3662
3665
|
width: ${e=>e.wrapperWidth.valuePx(e.windowSize)};
|
|
3663
3666
|
max-width: ${e=>e.wrapperWidth.valuePx(e.windowSize)};
|
|
@@ -3669,23 +3672,23 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3669
3672
|
box-sizing: border-box;
|
|
3670
3673
|
${e=>e.companyNameSticky?"position: sticky; z-index: 1;":"position: static; z-index: 0;"};
|
|
3671
3674
|
${e=>e.actualDataValue==="companyName"?`padding-left: ${t.Space.sp4}; flex: 1 1 auto`:`padding-left: ${t.Space.sp0};`}
|
|
3672
|
-
`,
|
|
3675
|
+
`,U0=s(t.SvgCloseRound)`
|
|
3673
3676
|
width: 12px;
|
|
3674
3677
|
height: 12px;
|
|
3675
3678
|
cursor: pointer;
|
|
3676
|
-
`,
|
|
3679
|
+
`,H0=s.div`
|
|
3677
3680
|
visibility: ${e=>e.isVisible?"visible":"hidden"};
|
|
3678
3681
|
display: flex;
|
|
3679
3682
|
align-items: center;
|
|
3680
3683
|
padding-top: 2px;
|
|
3681
|
-
`,
|
|
3684
|
+
`,K0=s.div`
|
|
3682
3685
|
display: flex;
|
|
3683
3686
|
cursor: pointer;
|
|
3684
3687
|
gap: 5px;
|
|
3685
3688
|
&:hover {
|
|
3686
3689
|
color: ${e=>e.theme.colors.primary};
|
|
3687
3690
|
}
|
|
3688
|
-
`;function wo({complete:e,notInitiated:n,isDisabled:r=!1,pendingReview:i=!1,pendingVerification:a=!1,onClick:d}){return e===!0?o.jsxRuntimeExports.jsx(
|
|
3691
|
+
`;function wo({complete:e,notInitiated:n,isDisabled:r=!1,pendingReview:i=!1,pendingVerification:a=!1,onClick:d}){return e===!0?o.jsxRuntimeExports.jsx(G0,{clickable:d!=null,onClick:d,children:o.jsxRuntimeExports.jsx(t.SmallRegular,{children:t.appLocale.getLocalizedStrings().common.completeText})}):a===!0?o.jsxRuntimeExports.jsx(Z0,{clickable:d!=null,onClick:d,children:o.jsxRuntimeExports.jsx(t.SmallRegular,{children:t.appLocale.getLocalizedStrings().common.pendingVerificationText})}):i===!0?o.jsxRuntimeExports.jsx(Y0,{clickable:d!=null,onClick:d,children:o.jsxRuntimeExports.jsx(t.SmallRegular,{children:t.appLocale.getLocalizedStrings().common.pendingReviewText})}):n===!0?o.jsxRuntimeExports.jsx(Hr,{clickable:d!=null,isDisabled:r===!0,onClick:d,children:o.jsxRuntimeExports.jsx(t.SmallRegular,{children:t.appLocale.getLocalizedStrings().common.notInitiatedText})}):o.jsxRuntimeExports.jsx(Hr,{clickable:d!=null,isDisabled:r===!0,onClick:d,children:o.jsxRuntimeExports.jsx(t.SmallRegular,{children:t.appLocale.getLocalizedStrings().common.incompleteText})})}const G0=s.div`
|
|
3689
3692
|
color: ${e=>e.theme.colors.success};
|
|
3690
3693
|
border: 1px solid ${e=>e.theme.colors.success};
|
|
3691
3694
|
padding: ${t.Space.sp0} 6px;
|
|
@@ -3694,7 +3697,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3694
3697
|
width: fit-content;
|
|
3695
3698
|
display: flex;
|
|
3696
3699
|
align-items: center;
|
|
3697
|
-
`,
|
|
3700
|
+
`,Y0=s.div`
|
|
3698
3701
|
color: ${e=>e.theme.colors.alert};
|
|
3699
3702
|
border: 1px solid ${e=>e.theme.colors.alert};
|
|
3700
3703
|
padding: ${t.Space.sp0} 6px;
|
|
@@ -3703,7 +3706,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3703
3706
|
width: fit-content;
|
|
3704
3707
|
display: flex;
|
|
3705
3708
|
align-items: center;
|
|
3706
|
-
`,
|
|
3709
|
+
`,Z0=s.div`
|
|
3707
3710
|
color: ${t.Colors.alert};
|
|
3708
3711
|
border: 1px solid ${t.Colors.alert};
|
|
3709
3712
|
padding: ${t.Space.sp0} 6px;
|
|
@@ -3722,7 +3725,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3722
3725
|
width: fit-content;
|
|
3723
3726
|
display: flex;
|
|
3724
3727
|
align-items: center;
|
|
3725
|
-
`,
|
|
3728
|
+
`,X0=({headerItemData:e,onboardingInfo:n,allUsers:r,isDisabled:i=!1,onOnboardingStepClicked:a})=>{const d=e.key;if(n!=null&&(d==="businessVerified"||d==="identityVerified")){const l=n[d],c=l.userIds!=null?r.find(m=>m.userId===l.userIds[0]):null,p=l.status==="Error"?t.appLocale.getLocalizedStrings().cockpit.review.errors.unitVerificationFailed:null;return l.status==="Error"?o.jsxRuntimeExports.jsxs(Kr,{children:[o.jsxRuntimeExports.jsxs(q0,{children:[o.jsxRuntimeExports.jsx(t.SvgHighImportance,{width:t.sp[3],height:t.sp[3]}),o.jsxRuntimeExports.jsx(J0,{children:o.jsxRuntimeExports.jsx(e2,{children:o.jsxRuntimeExports.jsx(t.Tooltip,{display:"flex",placement:"bottom",title:o.jsxRuntimeExports.jsx(t2,{children:p}),children:o.jsxRuntimeExports.jsx(Q0,{children:p})})})})]}),o.jsxRuntimeExports.jsx(t.ControlledComponent,{controller:c!=null,children:o.jsxRuntimeExports.jsx(Gr,{setMargin:!0,children:`${t.appLocale.getLocalizedStrings().common.by} ${c?.firstName} ${c?.lastName}`})})]}):o.jsxRuntimeExports.jsxs(Kr,{children:[o.jsxRuntimeExports.jsx(wo,{isDisabled:i,complete:l.status==="Complete",onClick:a!=null?()=>{a(e.key)}:void 0,pendingReview:l.status==="Pending Review",notInitiated:l.status==="Not Initiated"}),o.jsxRuntimeExports.jsx(t.ControlledComponent,{controller:c!=null,children:o.jsxRuntimeExports.jsx(Gr,{setMargin:!1,children:`${t.appLocale.getLocalizedStrings().common.by} ${c?.firstName} ${c?.lastName}`})}),o.jsxRuntimeExports.jsx(t.ControlledComponent,{controller:c==null,children:o.jsxRuntimeExports.jsx(o2,{})})]})}return null},Kr=s.div``,q0=s.div`
|
|
3726
3729
|
display: flex;
|
|
3727
3730
|
align-items: center;
|
|
3728
3731
|
column-gap: ${t.Space.sp1};
|
|
@@ -3730,7 +3733,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3730
3733
|
svg {
|
|
3731
3734
|
color: ${t.Colors.important};
|
|
3732
3735
|
}
|
|
3733
|
-
`,
|
|
3736
|
+
`,Q0=s(t.StandardRegular)`
|
|
3734
3737
|
color: ${e=>e.theme.colors.primary};
|
|
3735
3738
|
margin-right: ${t.Space.sp2};
|
|
3736
3739
|
max-width: 170px;
|
|
@@ -3738,7 +3741,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3738
3741
|
-webkit-box-orient: vertical;
|
|
3739
3742
|
-webkit-line-clamp: 1;
|
|
3740
3743
|
overflow: hidden;
|
|
3741
|
-
`,
|
|
3744
|
+
`,J0=s.div`
|
|
3742
3745
|
display: flex;
|
|
3743
3746
|
align-items: center;
|
|
3744
3747
|
cursor: default;
|
|
@@ -3797,7 +3800,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3797
3800
|
margin-left: ${e=>e.setMargin===!0?"20px":t.Space.sp0};
|
|
3798
3801
|
`,Yn=s.div`
|
|
3799
3802
|
height: 18px;
|
|
3800
|
-
`,{common:{strings:c2},cockpit:{onboarding:Zn}}=t.appLocale.getLocalizedStrings(),d2=["bankAccountLinked","qboLinked","identityVerified","businessVerified"],p2=({companyView:e,companyNameSticky:n,allUsers:r,sendInviteFetchState:i,retryBankAccountConnectionFetchState:a,totalHeight:d,addThreadRequestThreadId:l,targetElementFromNavigation:c,resetTargetElementFromNavigation:p,setNoteData:m,setElementRef:x,setAddThreadRequestThreadId:g,onOnboardingStepClicked:h,onSendInviteClick:C,redirectToDashboardOnboarding:b,onRetryBankAccountConnection:S})=>{const[y,j]=u.useState(null),f=t.useWindowSizeContext(),E=o.useForm({mode:"all"}),{company:{company:{companyInfo:{companyId:$,name:A,primaryEmailDomain:I},companyOnboardingInfo:{onboardingInfo:
|
|
3803
|
+
`,{common:{strings:c2},cockpit:{onboarding:Zn}}=t.appLocale.getLocalizedStrings(),d2=["bankAccountLinked","qboLinked","identityVerified","businessVerified"],p2=({companyView:e,companyNameSticky:n,allUsers:r,sendInviteFetchState:i,retryBankAccountConnectionFetchState:a,totalHeight:d,addThreadRequestThreadId:l,targetElementFromNavigation:c,resetTargetElementFromNavigation:p,setNoteData:m,setElementRef:x,setAddThreadRequestThreadId:g,onOnboardingStepClicked:h,onSendInviteClick:C,redirectToDashboardOnboarding:b,onRetryBankAccountConnection:S})=>{const[y,j]=u.useState(null),f=t.useWindowSizeContext(),E=o.useForm({mode:"all"}),{company:{company:{companyInfo:{companyId:$,name:A,primaryEmailDomain:I},companyOnboardingInfo:{onboardingInfo:w}}},tenant:k,onboardingCustomerInfo:N}=e,D=u2(e,r),G={companyEmailDomain:I,companyName:A,customerEmail:N.email??N.receiverEmails[0]??""},O=`cockpit_${$}`,Z="onboarding.notes",{threads:q,isLoading:R}=t.useFilteredThreads({entityType:Z,companyId:$},!1),{openThread:T,threads:V,addThread:W,removeThread:v,setOpenThread:L}=u.useContext(t.ThreadsContext),J=T!==null?V.get(T):null,re=T?.includes($)===!0,F=T!=null&&V.get(T)==null&&re,K=l!=null&&V.get(l)?.metadata.companyId===$,H=u.useCallback(()=>{T?.includes(t.NEW_THREAD_SUFFIX)===!0&&v(T),l!=null&&g(void 0)},[l,T,v,g]),_=z=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:z.isElementThreadOpen??!1,isElementThreadPresent:z.isElementThreadPresent??!1,itemKey:z.itemKey,elementThreadId:z.elementThreadId??c2.empty,roomId:O,addThreadRequestThreadId:l,openThreadId:T,threadStyle:z.threadStyle,openThreadMetadata:J?.metadata??null,onElementClick:ne,onAddThreadClick:Y,targetElement:c??y}),oe=u.useCallback(z=>{if(z===T)L(null);else if(V.has(z))L(z);else if(z.includes(t.NEW_THREAD_SUFFIX)){const[Ce,ue]=z.replace(t.NEW_THREAD_SUFFIX,"").split("."),Q=_t(Rt(Ce),ee.toOnboardingSortKeyType(ue),$,A);W(z,{type:"thread",visibility:"public",id:z,roomId:O,createdAt:new Date,updatedAt:new Date,comments:[],metadata:Q,resolved:!1}),L(z)}},[$,A,T,V,W,L,O]),ne=u.useCallback((z,Ce,ue=!1)=>{const Q=zt.find(P=>P.key===Ce);if(p(),Q!=null&&(z.type==="contextmenu"||ue===!0)){if(Q.isThreadAllowed===!1)return;H(),z.preventDefault(),z.stopPropagation();const P=t.toCollaborationEntityType({tab:"onboarding",key:Q.key});if(z.target instanceof HTMLElement||z.target instanceof SVGElement)if(ue===!0&&z.target instanceof HTMLElement)j(z.target.parentElement);else if(z.target instanceof HTMLElement){const pe=fs(z.target,te);j(pe||z.target)}else{const pe=z.target.closest(`.${te}`);pe instanceof HTMLElement&&j(pe)}const me=[...t.getFilteredThreads(V,{entityType:P,companyId:$},"both")],be=me.length>0&&me[0].length>0?me[0][0]:Pe("onboarding",Q.key,$);V.has(be)?oe(be):l===be?g(void 0):(g(be),L(null))}},[V,$,l,oe,g,L,p,H]),Y=u.useCallback((z,Ce)=>{z.stopPropagation();const ue=Pe("onboarding",Ce,$);g(void 0),oe(ue)},[$,g,oe]),le=(z,Ce)=>{},ce=u.useCallback(()=>{S($)},[S,$]);u.useEffect(()=>{const z=E.watch((Ce,{name:ue})=>{ue!=null&&Ce.companyData!=null&&o.defer(()=>le())});return()=>{z.unsubscribe()}});const fe=w?.inviteSent,we=w?.accountingConnectionCreationMode,B=u.useCallback(z=>{if(w==null)return!1;switch(z){case"bankAccountLinked":case"qboLinked":case"identityVerified":case"businessVerified":return!0;default:return!1}},[w]),Se=u.useCallback(z=>{if(d2.includes(z)&&B(z)){b(I);return}h($,z)},[b,I,$,h,B]),{useFeatureGate:ie}=t.useZeniFeatureContext(),{isFeatureEnabled:ye}=ie(t.FeatureGatesNames.isDebitCardFeatureEnabled),Ie=ee.isTenantBankingOnly(ye,k),xe=u.useMemo(()=>{const z=w?.inviteAccepted===!0,Ce=w?.groupCreated.completed===!0,ue=w?.customerCreated.completed===!0,Q=w?.accountingConnectionCreationMode==null,P=w?.accountingConnectionCreationMode==="zeni_user"&&w?.qboLinked.completed!==!0,me=!Ie;return z||!Ce||!ue||Q&&me||P&&me},[w?.accountingConnectionCreationMode,w?.customerCreated.completed,w?.groupCreated.completed,w?.inviteAccepted,w?.qboLinked.completed,Ie]),M=u.useMemo(()=>w?.inviteSent===!0?Zn.resendInvite:Zn.sendInvite,[w?.inviteSent]);return o.jsxRuntimeExports.jsx(o.FormProvider,{...E,children:o.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{p(),l!=null&&(g(void 0),l.includes(t.NEW_THREAD_SUFFIX)&&v(l))},children:o.jsxRuntimeExports.jsx(x2,{windowSize:f,isThreadOpen:re||K,totalHeight:d,isCreationInProgress:F,children:zt.map((z,Ce)=>{const ue=t.toCollaborationEntityType({tab:"onboarding",key:z.key}),Q=zt.length-2<=Ce,P=[...t.getFilteredThreads(V,{entityType:ue,companyId:$},"both")],me=P.length>0&&P[0].length>0?P[0][0]:Pe("onboarding",z.key,$),be=V.get(me),pe=be!=null&&be.resolved===!1,De=me===T,je=l===me;switch(z.key){case"companyName":return o.jsxRuntimeExports.jsxs(h2,{companyNameSticky:n,columnWidth:z.width,windowSize:f,isThreadOpen:De||je,isThreadAllowed:z.isThreadAllowed,className:te,onContextMenu:U=>ne(U,z.key),ref:U=>{x($,z.key,U)},children:[o.jsxRuntimeExports.jsxs(m2,{children:[o.jsxRuntimeExports.jsx(g2,{onClick:U=>{U.preventDefault()},children:A||I}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:De,targetElement:c??y,roomId:O,openThreadId:T,openThreadMetadata:J?.metadata??null})]}),o.jsxRuntimeExports.jsxs(S2,{className:"notesIcon",onClick:U=>{U.preventDefault(),m({roomId:O,companyId:$,companyName:A,entityType:Z})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:q.length,isLoading:R}),o.jsxRuntimeExports.jsx(y2,{})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:pe,itemKey:z.key,style:{left:t.Space.sp4},onElementClick:ne}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Pe("onboarding",z.key,$),addThreadRequestThreadId:l,itemKey:z.key,onAddThreadClick:Y})]},me);case"groupCreated":case"customerCreated":return o.jsxRuntimeExports.jsxs(Xt,{ref:U=>{x($,z.key,U)},columnWidth:z.width,windowSize:f,isThreadAllowed:z.isThreadAllowed,className:te,onContextMenu:U=>ne(U,z.key),children:[o.jsxRuntimeExports.jsx(Gn,{headerItemData:z,onOnboardingStepClicked:Se,onboardingInfo:w,allUsers:r}),_({isElementThreadOpen:De,isElementThreadPresent:pe,itemKey:z.key,elementThreadId:me,threadStyle:Q?{right:t.Space.sp0}:void 0})]},me);case"bankAccountLinked":return o.jsxRuntimeExports.jsxs(Xt,{ref:U=>{x($,z.key,U)},columnWidth:z.width,windowSize:f,isThreadAllowed:z.isThreadAllowed,className:te,onContextMenu:U=>ne(U,z.key),children:[o.jsxRuntimeExports.jsx(Gn,{headerItemData:z,onOnboardingStepClicked:Se,onboardingInfo:w,allUsers:r,isDisabled:fe!==!0,onRetry:ce,retryButtonLoading:a==="In-Progress",headerKey:z.key}),_({isElementThreadOpen:De,isElementThreadPresent:pe,itemKey:z.key,elementThreadId:me,threadStyle:Q?{right:t.Space.sp0}:void 0})]},me);case"qboLinked":return o.jsxRuntimeExports.jsxs(Xt,{ref:U=>{x($,z.key,U)},columnWidth:z.width,windowSize:f,isThreadAllowed:z.isThreadAllowed,className:te,onContextMenu:U=>ne(U,z.key),children:[o.jsxRuntimeExports.jsx(Gn,{headerItemData:z,onOnboardingStepClicked:Se,onboardingInfo:w,allUsers:r,isDisabled:we==="customer"&&fe!==!0||Ie}),_({isElementThreadOpen:De,isElementThreadPresent:pe,itemKey:z.key,elementThreadId:me,threadStyle:Q?{right:t.Space.sp0}:void 0})]},me);case"identityVerified":case"businessVerified":return o.jsxRuntimeExports.jsxs(Xt,{ref:U=>{x($,z.key,U)},columnWidth:z.width,windowSize:f,isThreadAllowed:z.isThreadAllowed,className:te,onContextMenu:U=>ne(U,z.key),children:[o.jsxRuntimeExports.jsx(X0,{headerItemData:z,onOnboardingStepClicked:Se,onboardingInfo:w,allUsers:r,isDisabled:fe!==!0}),_({isElementThreadOpen:De,isElementThreadPresent:pe,itemKey:z.key,elementThreadId:me,threadStyle:Q?{right:t.Space.sp0}:void 0})]},me);case"enroller":return o.jsxRuntimeExports.jsxs(Xt,{ref:U=>{x($,z.key,U)},columnWidth:z.width,windowSize:f,isThreadAllowed:z.isThreadAllowed,className:te,onContextMenu:U=>ne(U,z.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:"companyData.controller",value:D.controller,placeholderLabel:Zn.onboardingUsersPlaceholder,isReadOnly:!0,pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),_({isElementThreadOpen:De,isElementThreadPresent:pe,itemKey:z.key,elementThreadId:me,threadStyle:Q?{right:t.Space.sp0}:void 0})]},me);case"invite":return o.jsxRuntimeExports.jsxs(Xt,{ref:U=>{x($,z.key,U)},columnWidth:z.width,windowSize:f,isThreadAllowed:z.isThreadAllowed,className:te,onContextMenu:U=>ne(U,z.key),children:[o.jsxRuntimeExports.jsx(t.Button,{disabled:xe,variant:"primary",label:M,onClick:()=>C($,w?.inviteSent??!1,G),size:"small",loading:i==="In-Progress"}),_({isElementThreadOpen:De,isElementThreadPresent:pe,itemKey:z.key,elementThreadId:me,threadStyle:Q?{right:t.Space.sp0}:void 0})]},me);default:return null}})})})})})};function u2(e,n){const r=e.company.company.companyOnboardingInfo.onboardingUserIds,i=n.filter(d=>r.findIndex(l=>l===d.userId)>-1),a=[];return r.forEach(d=>{const l=i.filter(c=>c.userId===d)[0];l!=null&&a.push(l)}),{controller:{allUsers:n,selectedUsers:a}}}const m2=s.div``,x2=s.div`
|
|
3801
3804
|
display: flex;
|
|
3802
3805
|
flex-direction: row;
|
|
3803
3806
|
align-items: center;
|
|
@@ -3827,7 +3830,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3827
3830
|
}
|
|
3828
3831
|
}
|
|
3829
3832
|
|
|
3830
|
-
${e=>e.isThreadOpen?
|
|
3833
|
+
${e=>e.isThreadOpen?ve.css`
|
|
3831
3834
|
box-shadow: ${t.Space.sp0} 2px ${t.Space.sp2}
|
|
3832
3835
|
${e.theme.colors.dropShadowHover};
|
|
3833
3836
|
border: 1px solid ${e.theme.colors.primary};
|
|
@@ -3847,7 +3850,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3847
3850
|
border-color: ${e=>e.theme.colors.primary};
|
|
3848
3851
|
}
|
|
3849
3852
|
}
|
|
3850
|
-
${e=>e.isCreationInProgress?
|
|
3853
|
+
${e=>e.isCreationInProgress?ve.css`
|
|
3851
3854
|
border: 1px solid ${e.theme.colors.primary};
|
|
3852
3855
|
animation: animate 3s linear infinite;
|
|
3853
3856
|
`:null};
|
|
@@ -3897,7 +3900,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3897
3900
|
z-index: auto;
|
|
3898
3901
|
cursor: ${e=>e.isThreadAllowed?"pointer":"initial"};
|
|
3899
3902
|
position: relative;
|
|
3900
|
-
`,f2={onboardingRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},{cockpit:{onboarding:C2},common:{headers:{comments:j2}},collaboration:{threads:{placeholder:{addANewComment:b2,replyAComment:R2},tooltip:{resolveComment:$2,unResolveComment:E2}}}}=t.appLocale.getLocalizedStrings(),v2=({onboardingView:e,qboConnectionPoolFlag:n,onSendInviteClick:r,onOnboardingStepClicked:i,onCancelClicked:a,onGoLiveClicked:d,onScroll:l,onUpdateCustomerCreationStatus:c,onColumnSortConfigChanged:p,redirectToDashboardOnboarding:m,onRetryBankAccountConnection:x,onQBOConnectClick:g,initialOpenThreadRequest:h})=>{const C=t.useWindowSizeContext(),b=u.useRef(null),[S,y]=u.useState(null),{setOpenThread:j,setRequestToOpenThread:f,requestToOpenThread:E,isLoading:$}=u.useContext(t.ThreadsContext);u.useEffect(()=>{h!=null&&e.fetchState==="Completed"&&$===!1&&f(h)},[h,e.fetchState,$,f]);const[A,I]=u.useState(void 0),
|
|
3903
|
+
`,f2={onboardingRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},{cockpit:{onboarding:C2},common:{headers:{comments:j2}},collaboration:{threads:{placeholder:{addANewComment:b2,replyAComment:R2},tooltip:{resolveComment:$2,unResolveComment:E2}}}}=t.appLocale.getLocalizedStrings(),v2=({onboardingView:e,qboConnectionPoolFlag:n,onSendInviteClick:r,onOnboardingStepClicked:i,onCancelClicked:a,onGoLiveClicked:d,onScroll:l,onUpdateCustomerCreationStatus:c,onColumnSortConfigChanged:p,redirectToDashboardOnboarding:m,onRetryBankAccountConnection:x,onQBOConnectClick:g,initialOpenThreadRequest:h})=>{const C=t.useWindowSizeContext(),b=u.useRef(null),[S,y]=u.useState(null),{setOpenThread:j,setRequestToOpenThread:f,requestToOpenThread:E,isLoading:$}=u.useContext(t.ThreadsContext);u.useEffect(()=>{h!=null&&e.fetchState==="Completed"&&$===!1&&f(h)},[h,e.fetchState,$,f]);const[A,I]=u.useState(void 0),w=u.useRef(null),k=u.useRef([]),[N,D]=u.useState(null),G=!(C==="small"||C==="medium-compact"),{uiState:O}=e,Z=C2.onboardingCompleted.replace("_company-name_",O.selectedCustomerName),[q,R]=u.useState("Not-Started"),[T,V]=u.useState("Not-Started"),{saveFetchState:W,customerCreationStatus:v}=e;u.useEffect(()=>{W.fetchState==="Completed"&&v.stage!=="none"?(V("Not-Started"),R(W.fetchState)):R("Not-Started")},[W.fetchState,v]),u.useEffect(()=>{e.updateStatus.fetchState==="Completed"?(R("Not-Started"),V(e.updateStatus.fetchState)):V("Not-Started")},[e.updateStatus.fetchState]);const L=0,J=u.useCallback(()=>{const _=e.onboardingCustomers.filter(oe=>oe.company.company.companyInfo.companyId===O.selectedCompanyId);if(_.length>0){const{company:oe,onboardingCustomerInfo:ne,tenant:Y}=_[0],le={companyEmailDomain:ne.companyEmailDomain,companyId:oe.company.companyInfo.companyId,isOnboardingCompleted:!0,isOnboardingTenant:!0,tenantId:Y.tenantId,userEmailWithPreOnboardSuccess:ne.userEmailWithPreOnboardSuccess};d(le)}},[d,e.onboardingCustomers,O.selectedCompanyId]),re=u.useCallback(_=>e.onboardingCustomers[_].company.company.companyInfo.name.length>Wt?Le+32:Le,[e.onboardingCustomers]);u.useEffect(()=>{b.current&&b.current.resetAfterIndex(0)},[e]);const F=u.useMemo(()=>({makeCompanyNameSticky:G,uiState:O,onColumnSortConfigChanged:p}),[G,O,p]),K=u.useCallback((_,oe,ne)=>{const Y=e.onboardingCustomers.findIndex(ce=>ce.company.company.companyInfo.companyId===_),le=zt.findIndex(ce=>ce.key===oe);Y!==-1&&le!==-1&&(k.current[Y]==null?k.current[Y]=[ne]:k.current[Y][le]=ne)},[e.onboardingCustomers]),H=u.useCallback(()=>{w.current=null,f(null)},[f]);return u.useEffect(()=>{if(E!=null&&S!=null){const{companyId:_,entityType:oe}=E,[ne,Y]=oe.split("."),le=e.onboardingCustomers.findIndex(B=>B.company.company.companyInfo.companyId===_),ce=zt.findIndex(B=>B.key===Y);le!==-1&&!(S.visibleStartIndex<=le&&S.visibleStopIndex>=le)&&b.current?.scrollToItem(le,"center"),setTimeout(()=>{const B=k.current[le]?.[0]?.getBoundingClientRect().bottom,Se=k.current[le]?.[0]?.getBoundingClientRect().top;if(B!=null&&Se!=null&&(window.innerHeight>=B&&window.innerHeight>=Se||Se<0)){const ie=k.current[le][ce];ie!=null&&(w.current={companyId:_,target:ie}),k.current[le][ce]?.scrollIntoView({block:"center",behavior:"auto"})}},0);const we=setInterval(()=>{const B=k.current[le]?.[ce]?.getBoundingClientRect().left,Se=k.current[le]?.[ce]?.getBoundingClientRect().right,ie=k.current[le]?.[ce]?.offsetWidth;if(w.current?.companyId===_&&B!=null&&ie!=null&&Se!=null&&(B<window.innerWidth-ie||Se<window.innerWidth)){clearInterval(we);const ye=E.threadId,Ie=E.onThreadShownCallback;ye&&(f(null),j(E.threadId),Ie?.())}},500);setTimeout(()=>{clearInterval(we),f(null)},2e3)}},[E,S,j,f]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[n?o.jsxRuntimeExports.jsx(C0,{qboConnectionPool:e.qboConnectionPool,isLoading:e.qboConnectionPool.saveQBOConnectionPoolState.fetchState==="In-Progress",onQBOConnectClick:g}):null,o.jsxRuntimeExports.jsxs(k2,{children:[O.showGoLivePopUp===!0?o.jsxRuntimeExports.jsx(L0,{hasAdminRole:!0,onCancelClick:()=>{a()},onGoLiveClick:J,showGoLivePopup:O.showGoLivePopUp,loading:e.updateStatus.fetchState==="In-Progress"}):null,q==="Completed"?o.jsxRuntimeExports.jsx(Ur,{customerCreationType:v,fetchState:q,onRemoveSnackbar:()=>{c(),R("Not-Started")}}):null,T==="Completed"?o.jsxRuntimeExports.jsx(Ur,{fetchState:T,customMessageText:Z,onRemoveSnackbar:()=>{V("Not-Started")}}):null,o.jsxRuntimeExports.jsxs(xa.Provider,{value:F,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:_,width:oe})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:_,width:oe,itemCount:e.onboardingCustomers.length,itemSize:re,onItemsRendered:ne=>y(ne),overscanCount:Bt,itemData:{onboardingView:e,makeCompanyNameSticky:G,addThreadRequestThreadId:A,targetElement:w.current?.target,resetTargetElementFromNavigation:H,setElementRef:K,setAddThreadRequestThreadId:I,setNoteData:D,onOnboardingStepClicked:i,onSendInviteClick:r,redirectToDashboardOnboarding:m,onRetryBankAccountConnection:x},ref:b,innerElementType:ha,onScroll:({scrollOffset:ne})=>{l(ne)},initialScrollOffset:L,style:{willChange:"auto"},children:w2})}),N!=null?o.jsxRuntimeExports.jsx(Xe.RoomProvider,{id:N.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${N.companyName} ${j2}`,filter:{application:"cockpit",companyId:N.companyId,entityType:N.entityType,isGlobalComment:!1,tab:"onboarding"},isLoading:!1,threadMetadata:{companyName:N.companyName,companyId:N.companyId,entityId:N.companyId,entityType:N.entityType,isGlobalComment:!1,application:"cockpit",tab:"onboarding",url:window.location.href},textOverrides:{composerPlaceholder:b2,replyComposerPlaceholder:R2,threadResolve:$2,threadUnResolve:E2},onThreadClick:_=>null,onCloseAllThreadsDrawer:()=>D(null)})}):null]})]})]})},xa=u.createContext(void 0),ha=u.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:d,uiState:l,onColumnSortConfigChanged:c}=u.useContext(xa);return o.jsxRuntimeExports.jsxs(I2,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(B0,{companyNameSticky:d,onColumnSortConfigChanged:c,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),o.jsxRuntimeExports.jsx(P2,{children:r})]})});ha.displayName="Onboarding list view inner element type";const w2=({index:e,style:n,data:r})=>{const i=t.useWindowSizeContext(),{onboardingView:a,makeCompanyNameSticky:d,addThreadRequestThreadId:l,targetElement:c,resetTargetElementFromNavigation:p,setElementRef:m,setNoteData:x,setAddThreadRequestThreadId:g,onOnboardingStepClicked:h,onSendInviteClick:C,redirectToDashboardOnboarding:b,onRetryBankAccountConnection:S}=r,y=a.onboardingCustomers[e],{companyId:j}=y.company.company.companyInfo;return o.jsxRuntimeExports.jsx(T2,{isCollapsed:!0,style:{...n,width:"fit-content",minWidth:"100%",padding:`${t.Space.sp0} ${f2.onboardingRightPadding.valuePx(i)} ${t.Space.sp3} ${t.Space.sp0}`},children:o.jsxRuntimeExports.jsx(p2,{totalHeight:typeof n.height=="number"?n.height:Le,companyView:a.onboardingCustomers[e],companyNameSticky:d,allUsers:a.zeniUsers.values,sendInviteFetchState:a.sendInviteFetchStateByCompanyId[a.onboardingCustomers[e].company.company.companyInfo.companyId]?.fetchState,addThreadRequestThreadId:l,targetElementFromNavigation:c,resetTargetElementFromNavigation:p,setNoteData:x,setElementRef:m,setAddThreadRequestThreadId:g,retryBankAccountConnectionFetchState:a.retryBankAccountConnectionFetchStateByCompanyId[a.onboardingCustomers[e].company.company.companyInfo.companyId]?.fetchState,onOnboardingStepClicked:h,onSendInviteClick:C,redirectToDashboardOnboarding:b,onRetryBankAccountConnection:S})},j)},k2=s.div`
|
|
3901
3904
|
/** Subtract top so list can occupy remaining available height */
|
|
3902
3905
|
height: calc(100vh - 108px);
|
|
3903
3906
|
max-width: 99.9%;
|
|
@@ -3928,7 +3931,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3928
3931
|
height: calc(100vh - 45px);
|
|
3929
3932
|
overflow-y: hidden;
|
|
3930
3933
|
background-color: ${e=>e.theme.colors.grey4};
|
|
3931
|
-
`,{cockpit:{emptySearchTextFirstLine:O2,emptySearchTextSecondLine:N2,onboarding:Zr},common:{no:M2,yes:z2}}=t.appLocale.getLocalizedStrings(),F2=({headerData:e,headerActions:n,initialOpenThreadRequest:r,onboardingPageActions:i,onboardingPageData:a})=>{const[d,l]=u.useState(!1),[c,p]=u.useState(void 0),[m,x]=u.useState(void 0),{analytics:g}=t.useToolkitContext(),{onboardingView:h,qboConnectionPoolFlag:C}=a,{onScroll:b,onOnboardingStepClicked:S,onCancelClicked:y,onGoLiveClicked:j,onUpdateCustomerCreationStatus:f,onCockpitReloadData:E,onSendInviteClick:$,onColumnSortConfigChanged:A,redirectToDashboardOnboarding:I,onRetryBankAccountConnection:
|
|
3934
|
+
`,{cockpit:{emptySearchTextFirstLine:O2,emptySearchTextSecondLine:N2,onboarding:Zr},common:{no:M2,yes:z2}}=t.appLocale.getLocalizedStrings(),F2=({headerData:e,headerActions:n,initialOpenThreadRequest:r,onboardingPageActions:i,onboardingPageData:a})=>{const[d,l]=u.useState(!1),[c,p]=u.useState(void 0),[m,x]=u.useState(void 0),{analytics:g}=t.useToolkitContext(),{onboardingView:h,qboConnectionPoolFlag:C}=a,{onScroll:b,onOnboardingStepClicked:S,onCancelClicked:y,onGoLiveClicked:j,onUpdateCustomerCreationStatus:f,onCockpitReloadData:E,onSendInviteClick:$,onColumnSortConfigChanged:A,redirectToDashboardOnboarding:I,onRetryBankAccountConnection:w,onQBOConnectClick:k}=i,N=h.fetchState==="Completed"&&h.zeniUsers.fetchState==="Completed",D={onOkClick:()=>{l(!1),c!=null&&($(c),m!=null&&g.trackOnboardingSendInvite(c,!1,m))},onCancelClick:()=>{l(!1)}};return o.jsxRuntimeExports.jsxs(D2,{children:[d===!0?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{style:{paddingLeft:t.Space.sp6,paddingRight:t.Space.sp6},children:Zr.confirmationPopup.title}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Zr.confirmationPopup.subTitle}),primaryButtonText:z2,secondaryButtonText:M2,action:D,style:{background:t.Colors.overlayDark}}):null,o.jsxRuntimeExports.jsx(dt,{headerActions:{...n},headerData:{...e,allTabOptions:e.allTabOptions??it,companiesLoaded:N,filterData:{filterText:h.uiState.filterText,disableFilters:!0},selectedTabOption:"onboarding"}}),o.jsxRuntimeExports.jsx(B2,{initialOpenThreadRequest:r,onColumnSortConfigChanged:A,onCockpitReloadData:E,onGoLiveClicked:j,onQBOConnectClick:k,onRetryBankAccountConnection:w,onScroll:b,onSendInviteClick:(G,O,Z)=>{O?($(G),g.trackOnboardingSendInvite(G,!0,Z)):(p(G),x(Z),l(!0))},onboardingView:h,onOnboardingStepClicked:S,onCancelClicked:y,onUpdateCustomerCreationStatus:f,qboConnectionPoolFlag:C,redirectToDashboardOnboarding:I})]})},B2=({onboardingView:e,qboConnectionPoolFlag:n,initialOpenThreadRequest:r,onSendInviteClick:i,onScroll:a,onOnboardingStepClicked:d,onCancelClicked:l,onGoLiveClicked:c,onUpdateCustomerCreationStatus:p,onCockpitReloadData:m,onColumnSortConfigChanged:x,redirectToDashboardOnboarding:g,onRetryBankAccountConnection:h,onQBOConnectClick:C})=>{const b=t.useWindowSizeContext();return e.fetchState==="Error"?o.jsxRuntimeExports.jsx($t,{onCockpitReloadData:m,selectedCockpitOption:"onboarding"}):e.fetchState==="In-Progress"||e.fetchState==="Not-Started"?o.jsxRuntimeExports.jsx(L2,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})}):e.onboardingCustomers.length===0?o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:O2,emptySearchTextSecondLine:N2}):o.jsxRuntimeExports.jsx(A2,{windowSize:b,children:o.jsxRuntimeExports.jsx(v2,{initialOpenThreadRequest:r,onCancelClicked:l,onColumnSortConfigChanged:x,onGoLiveClicked:c,onQBOConnectClick:C,onRetryBankAccountConnection:h,onScroll:a,onSendInviteClick:i,onUpdateCustomerCreationStatus:p,onboardingView:e,qboConnectionPoolFlag:n,redirectToDashboardOnboarding:g,onOnboardingStepClicked:d})})},W2=t.appLocale.getLocalizedStrings().common,_2=({localData:e,labelWidth:n,onCompanyDomainBlurred:r,isOnboardingAllowedForUser:i})=>{const a=t.appLocale.getLocalizedStrings().cockpit.onboarding,{isCustomerCreated:d,isEmailGroupCreated:l,companyEmailDomain:c,companyId:p}=e.newOnboardingCustomerLocalData,m=d===!0||l===!0||p!=null||i===!1,x=c!=null&&K2(c);return o.jsxRuntimeExports.jsxs(V2,{children:[o.jsxRuntimeExports.jsx(H2,{children:a.customer.companyCredentials}),o.jsxRuntimeExports.jsx(U2,{children:o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:a.customer.companyDomain,width:n},text:{type:"text",name:"companySection.companyDomain",placeholder:`${W2.add} ${a.customer.domain}`,options:{required:!0,pattern:t.DOMAIN_PATTERN}},onBlur:()=>{x&&r(c)},isDisabled:m===!0?"readonly":void 0})})]})},V2=s.div`
|
|
3932
3935
|
display: flex;
|
|
3933
3936
|
flex-direction: column;
|
|
3934
3937
|
gap: ${t.Space.sp2};
|
|
@@ -3998,7 +4001,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3998
4001
|
height: ${t.Space.sp6};
|
|
3999
4002
|
align-items: center;
|
|
4000
4003
|
padding: ${t.Space.sp0} ${t.Space.sp4};
|
|
4001
|
-
`,st=t.appLocale.getLocalizedStrings().common,{cockpit:{onboarding:
|
|
4004
|
+
`,st=t.appLocale.getLocalizedStrings().common,{cockpit:{onboarding:Re},common:{strings:{colon:xt,empty:Xr},placeholder:J2,labels:eC}}=t.appLocale.getLocalizedStrings(),tC=`${st.add} ${Re.customer.customerFirstName.toLowerCase()}`,oC=`${st.add} ${Re.customer.customerLastName.toLowerCase()}`,nC=`${st.add} ${Re.customer.customerName.toLowerCase()}`,Sa=u.forwardRef(({sectionId:e,localData:n,onboardedCompanies:r,isSubsidiary:i,labelWidth:a,realmIdAdditionalLabel:d,productsAdditionalLabel:l,isDisabled:c,largeLabelWidth:p},m)=>{const{emailGroupFetchState:x,newOnboardingCustomerLocalData:g,companyView:h,allProductsList:C}=n,b=o.useTheme(),[S,y]=u.useState(xn(C,g.selectedProducts??[]));u.useEffect(()=>{g.selectedProducts!=null&&y(xn(C,g.selectedProducts))},[g.selectedProducts]);const j=x.fetchState!=="Completed"&&g.isEmailGroupCreated==null,f=c!=null||j?"disabled":c,E=n.companyView?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed===!0;let $;const A=r.find(I=>I.companyInfo.companyId===g.parentCompanyId);return A!=null&&($={label:A.companyInfo.name,value:A.companyInfo.companyId}),o.jsxRuntimeExports.jsxs(sC,{isDisabled:j,ref:m,children:[o.jsxRuntimeExports.jsxs(rC,{children:[o.jsxRuntimeExports.jsx(aC,{children:Re.customer.customerCreation}),g.companyId!=null&&o.jsxRuntimeExports.jsx(ga,{isCompleted:h?.company.companyOnboardingInfo.onboardingInfo?.customerCreated.completed===!0})]}),o.jsxRuntimeExports.jsxs(iC,{children:[o.jsxRuntimeExports.jsx(t.LabeledNameField,{label:{label:`${Re.customer.customerName}${xt}`,width:a},nameField:{name:`${e}.customerName`,registerOptions:{required:!0},defaultValue:{firstName:n.newOnboardingCustomerLocalData.customerName?.firstName??Xr,lastName:n.newOnboardingCustomerLocalData.customerName?.lastName??Xr},placeHolder:{firstName:tC,lastName:oC,name:nC},showFullNameError:!0},isDisabled:f==="disabled"?"disabled":c,showAdditionalInfoLabel:!0,additionalInfoLabel:Re.customer.customerNameInfoText,style:{width:"auto"}}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${Re.customer.customerEmail}${xt}`,width:a},text:{type:"email",name:`${e}.email`,placeholder:`${st.add} ${Re.customer.customerEmail.toLowerCase()}`,autoComplete:"off",options:{required:!0}},isDisabled:f==="disabled"?"disabled":c,showAdditionalInfoLabel:!0,additionalInfoLabel:Re.customer.customerEmailInfoText}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${Re.customer.companyName}${xt}`,width:a},text:{type:"text",name:`${e}.name`,placeholder:`${st.add} ${Re.customer.companyName.toLowerCase()}`,options:{required:!0}},isDisabled:f,showAdditionalInfoLabel:!0,additionalInfoLabel:Re.customer.companyNameInfoText}),i===!0?o.jsxRuntimeExports.jsx(X2,{label:{label:`${Re.customer.entity}${xt}`,width:a},concatText:Re.customer.of,firstSingleSelectField:{name:`${e}.entityType`,placeholder:`${st.add} ${Re.customer.entity.toLowerCase()}`,defaultValue:{selectedOption:{value:Re.customer.subsidiary,label:Re.customer.subsidiary},allOptions:[{value:Re.customer.parent,label:Re.customer.parent},{value:Re.customer.subsidiary,label:Re.customer.subsidiary}]},style:{backgroundColor:b.colors.background}},secondSingleSelectField:{name:`${e}.company`,placeholder:`${st.add} ${Re.customer.parent.toLowerCase()}`,defaultValue:{selectedOption:$,allOptions:r.map(I=>({label:I.companyInfo.name,value:I.companyInfo.companyId}))},style:{backgroundColor:b.colors.background},registerOptions:{required:i}},isDisabled:f}):o.jsxRuntimeExports.jsx(t.LabeledSingleSelectWithoutClearableField,{label:{label:`${Re.customer.entity}${xt}`,width:a},singleSelectWithoutClearableField:{name:`${e}.entityType`,placeholder:`${st.add} ${Re.customer.entity.toLowerCase()}`,defaultValue:{selectedOption:{value:Re.customer.parent,label:Re.customer.parent},allOptions:[{value:Re.customer.parent,label:Re.customer.parent},{value:Re.customer.subsidiary,label:Re.customer.subsidiary}]}},isDisabled:f}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${Re.customer.realmId}${xt}`,width:a},text:{type:"text",name:`${e}.realmId`,placeholder:`${st.add} ${Re.customer.realmIdText}`,options:{pattern:t.REALM_ID}},showTooltip:!0,tooltipTitle:o.jsxRuntimeExports.jsx(lC,{}),isDisabled:f==="disabled"||E===!0?"disabled":c,isOptional:!0}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${Re.customer.confirmRealmId}${xt}`,width:p},text:{type:"text",name:`${e}.confirmRealmId`,placeholder:`${Re.customer.confirmRealmIdText}`,options:{pattern:t.REALM_ID,validate:(I,w)=>I===w[e].realmId}},additionalInfoLabel:d,disableCopyPaste:!0,isDisabled:f==="disabled"||E===!0?"disabled":c,isOptional:!0}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${Re.customer.hubSpotId}${xt}`,width:a},text:{type:"text",name:"customerSection.hubSpotId",placeholder:`${st.add} ${Re.customer.hubSpotIdText}`,options:{pattern:t.DIGITS_PATTERN}},isDisabled:f,isOptional:!0}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${Re.customer.chargebeeId}${xt}`,width:a},text:{type:"text",name:"customerSection.chargebeeId",placeholder:`${st.add} ${Re.customer.chargebeeIdText}`,options:{pattern:t.ALPHA_NUMERIC_PATTERN,required:!0}},isDisabled:f}),o.jsxRuntimeExports.jsx(t.LabeledMultiSelectWithCheckBoxField,{label:{label:eC.products,width:a},additionalInfoLabel:l||void 0,multiSelectWithCheckBoxField:{name:"customerSection.products",defaultValue:{allOptions:S,selectedOptions:g.selectedProducts??[]},placeholder:J2.productsPlaceholder,isDisabled:f,registerOptions:{validate:I=>I!=null&&I.selectedOptions.length>0}},style:{width:"auto"}})]})]})});Sa.displayName="CustomerCreation";const sC=s.div`
|
|
4002
4005
|
opacity: ${e=>e.isDisabled?.4:1};
|
|
4003
4006
|
display: flex;
|
|
4004
4007
|
flex-direction: column;
|
|
@@ -4050,7 +4053,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4050
4053
|
align-items: center;
|
|
4051
4054
|
z-index: 10;
|
|
4052
4055
|
margin-top: 28px;
|
|
4053
|
-
`;function yC({sectionId:e,isSectionDisabled:n,isLoading:r,accountingConnectionCreationMode:i,isConnected:a,isInviteSent:d,saveConnectionState:l,onQBOConnectClick:c}){const p=t.appLocale.getLocalizedStrings().cockpit.onboarding;return o.jsxRuntimeExports.jsxs(fC,{isDisabled:n===!0,children:[o.jsxRuntimeExports.jsx(vC,{children:p.qboSectionTitle}),o.jsxRuntimeExports.jsxs(CC,{children:[o.jsxRuntimeExports.jsx(wC,{children:
|
|
4056
|
+
`;function yC({sectionId:e,isSectionDisabled:n,isLoading:r,accountingConnectionCreationMode:i,isConnected:a,isInviteSent:d,saveConnectionState:l,onQBOConnectClick:c}){const p=t.appLocale.getLocalizedStrings().cockpit.onboarding;return o.jsxRuntimeExports.jsxs(fC,{isDisabled:n===!0,children:[o.jsxRuntimeExports.jsx(vC,{children:p.qboSectionTitle}),o.jsxRuntimeExports.jsxs(CC,{children:[o.jsxRuntimeExports.jsx(wC,{children:ee.ALL_ACCOUNTING_CONNECTION_CREATION_MODES.map((m,x)=>o.jsxRuntimeExports.jsx(kC,{isDisabled:n===!0,leftSideContainer:x===0,children:o.jsxRuntimeExports.jsx(t.LabeledRadioField,{label:{label:p.qboRadioButtonLabels[m]},style:{width:"100%",backgroundColor:"transparent",borderWidth:0},isDisabled:a===!0||n===!0||d===!0?"disabled":void 0,changeLabelColorInDisableMode:!1,radioField:{radioSize:"small",name:`${e}.accountingConnectionCreationMode`,id:m,value:m}})},m))}),o.jsxRuntimeExports.jsxs(PC,{isDisabled:n===!0||i!=="zeni_user",children:[o.jsxRuntimeExports.jsxs(jC,{children:[o.jsxRuntimeExports.jsxs(bC,{children:[o.jsxRuntimeExports.jsx(RC,{}),o.jsxRuntimeExports.jsx($C,{}),o.jsxRuntimeExports.jsx(EC,{})]}),a!==!0?o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",label:p.connectQBOButtonLabel,style:{width:"fit-content"},disabled:n===!0||i!=="zeni_user",onClick:c,loading:r===!0}):o.jsxRuntimeExports.jsx(wo,{complete:!0})]}),a===!0?o.jsxRuntimeExports.jsx(TC,{children:p.qboSuccessText}):null,l==="Error"?o.jsxRuntimeExports.jsx(IC,{children:p.qboErrorText}):null]})]})]})}const fC=s.div`
|
|
4054
4057
|
opacity: ${e=>e.isDisabled?.4:1};
|
|
4055
4058
|
display: flex;
|
|
4056
4059
|
flex-direction: column;
|
|
@@ -4120,7 +4123,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4120
4123
|
color: ${t.Colors.importantDark};
|
|
4121
4124
|
padding: ${t.Space.sp2} ${t.Space.sp2};
|
|
4122
4125
|
border-radius: ${t.Space.sp1};
|
|
4123
|
-
`,Qr=t.appLocale.getLocalizedStrings().common,Jr="onboardingCustomerPage",LC="companySection",lt="groupSection",De="customerSection",fa="qboConnectionSection",yo={labelWidth:new t.ResponsiveSized(120,180),largeLabelWidth:new t.ResponsiveSized(120,210,210),extraLargeLabelWidth:new t.ResponsiveSized(240,240,240),descriptionMarginBottom:new t.ResponsiveSized(20,t.sp[3]),titleFontSize:new t.ResponsiveSized(t.sp[3],18),titleLineHeight:new t.ResponsiveSized(t.sp[4],27),buttonWidth:new t.ResponsiveSized(135,135)},{cockpit:{onboarding:Re},common:{no:AC,yes:DC,strings:pe}}=t.appLocale.getLocalizedStrings();function OC({localData:e,screenType:n,qboConnectClicked:r,analytics:i,onOnboardingCustomerDataUpdated:a,onCloseClick:d,onSaveClick:l,onViewClick:c,onCompanyDomainBlurred:p,onNavigateToPreOnboarding:m,onQBOConnectClick:x}){const g=o.useTheme(),h=t.useWindowSizeContext(),C=yo.labelWidth.value(h),b=yo.largeLabelWidth.value(h),S=yo.extraLargeLabelWidth.value(h),y=o.useForm({mode:"all",reValidateMode:"onChange",defaultValues:u.useMemo(()=>fo(e),[e])}),{emailGroupFetchState:j,newOnboardingCustomerLocalData:f,onboardingCompletedCompanies:E,isOnboardingAllowedForUser:$,fetchState:A,sendInviteFetchState:I,uiState:v,companyView:w,externalConnections:F}=e,[D,K]=u.useState(pe.empty),[M,G]=u.useState(pe.empty),[q]=u.useState(pe.empty),[R,L]=u.useState(pe.empty),[W,k]=u.useState(pe.empty),[P,N]=u.useState(!1),[Q,ae]=u.useState(!1),[z,Y]=u.useState(Re.customer.completePreOnboardingText),[T,te]=u.useState(!1),re=u.useRef(null),Z=u.useRef(null),ie=u.useRef(null),{isExistingCustomer:ne,isCustomerOnboardedSuccessfully:xe}=BC(e),ye=ne&&xe?Re.customer.customerNameExistInManagementText:Re.customer.customerNameExistInOnboardingText,$e=u.useMemo(()=>ye.replace("_company-domain_",f.companyEmailDomain??pe.empty),[j.fetchState]),V=w?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed,ee=u.useCallback(()=>{const me=y.getValues();return me[De].realmId!==me[De].confirmRealmId?(L(Re.customer.realmIdWarning),y.trigger(`${De}.confirmRealmId`),!1):(L(pe.empty),y.clearErrors(`${De}.confirmRealmId`),!0)},[y]),ge=u.useCallback(()=>{const me=y.getValues();return me[De].entityType.selectedOption?.value=="Subsidiary"&&me[De].company.selectedOption==null?(y.setError("customerSection.company",{type:"required"}),!1):(y.clearErrors("customerSection.company"),!0)},[y]),ve=u.useCallback(()=>f.customerName?.firstName&&!f.customerName?.lastName||!f.customerName?.firstName&&f.customerName?.lastName?(y.trigger(`${De}.customerName`),!1):(f.customerName?.firstName||f.customerName?.lastName)&&!f.email?(y.trigger(`${De}.email`),!1):(f.customerName?.firstName||f.customerName?.lastName)&&f.email&&f.selectedProducts?.length===0?(k(Re.customer.productsWarning),y.trigger(`${De}.products`),!1):!0,[y,f.customerName,f.email,f.selectedProducts]),Ce=u.useCallback(()=>ee()&&ge()&&ve(),[ge,ee,ve]),O=y.handleSubmit(()=>{Y(Re.customer.completePreOnboardingText),Ce()&&ae(!0)},()=>{Ce(),console.warn("Onboarding customer form error")}),ke=y.getValues()[De].email??pe.empty,B=(me=!1)=>{const X={companyDomain:f.companyEmailDomain??pe.empty,primaryContactEmail:ke},Ne={groupName:f.groupName??pe.empty,groupEmail:f.groupId??pe.empty,groupDescription:f.groupDescription??pe.empty},Qe={firstName:f.customerName?.firstName??pe.empty,lastName:f.customerName?.lastName??pe.empty,customerEmail:ke,companyName:f.name??pe.empty,entittyType:f.isSubsidiary===!0?Re.customer.subsidiary:Re.customer.parent??pe.empty,chargebeeId:f.chargebeeId??pe.empty,products:f.selectedProducts??[],qboRealmId:f.qboRealmId??pe.empty,hubSpotId:f.hubSpotId},Ke={isSendInvite:me,isInviteAlreadySent:w?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0,isZeniManagedQboConnectionSelected:f.accountingConnectionCreationMode==="zeni_user",isCustomerManagedQboConnectionSelected:f.accountingConnectionCreationMode==="customer",qboConnectionStatus:w?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed??!1};i?.trackOnboardingSaveOrSendInvite(X,Ne,Qe,Ke)},de=()=>{const me={companyEmailDomain:f.companyEmailDomain??pe.empty,primaryContactEmail:ke},X={groupName:f.groupName??pe.empty,groupEmail:f.groupId??pe.empty,groupDescription:f.groupDescription??pe.empty,isCompanyEmailDomainAvailable:!0};i?.trackOnboardingNewCustomerGroupCreationCheck(me,X)},je=()=>{let me=!0;const X=y.getValues();if(X[lt].groupEmail!==pe.empty&&X[lt].groupName===pe.empty)K(Re.customer.groupNameWarning),y.setError("groupSection.groupName",{type:"required"}),me=!1;else if(X[lt].groupName!==pe.empty&&X[lt].groupEmail===pe.empty)G(Re.customer.groupEmailWarning),y.setError("groupSection.groupEmail",{type:"required"}),me=!1;else{const{error:Ne}=y.getFieldState("groupSection.groupName"),{error:Qe}=y.getFieldState("groupSection.groupEmail");(Ne==null||Ne.type==="required")&&(Qe==null||Qe.type==="required")&&(me=!1,y.clearErrors("groupSection")),K(pe.empty),G(pe.empty)}return me},U={onOkClick:()=>{N(!1),y.reset(),d()},onCancelClick:()=>{N(!1)}},_={onOkClick:()=>{ae(!1),l(!0),B(!0)},onCancelClick:()=>{ae(!1)}},ce=async(me,X)=>{const Ne={...X};if(me.includes("groupName")&&X[lt].groupName!=pe.empty&&(X[lt].groupName=X[lt].groupName.charAt(0).toUpperCase()+X[lt].groupName.slice(1)),(me.includes("groupName")||me.includes("groupEmail"))&&je(),me.includes("confirmRealmId")&&L(pe.empty),me.includes("products")&&o.isEqual(f.selectedProducts??[],X[De].products.selectedOptions)===!1){k(pe.empty);const Qe=WC(f.selectedProducts??[],X[De].products.selectedOptions.map(Et=>J.toProductTypeStrict(Et)).filter(Et=>Et!=null));Ne[De].products.selectedOptions=Qe;const Ke=xn(e.allProductsList,Qe);y.setValue(`${De}.products`,{allOptions:Ke,selectedOptions:Qe})}me.includes("realmId")&&o.has(y.formState.errors,`${De}.confirmRealmId`)&&y.trigger(`${De}.confirmRealmId`),a(Ne)},Se=me=>{const{dirtyFields:X}=y.formState;X.companySection?.companyDomain===!0&&p(me)},fe=()=>{Object.keys(y.formState.errors).length===0&&(m?.(),Y(pe.empty))},Ie=()=>{j.fetchState==="Error"?p(f.companyEmailDomain):Ce()&&Object.keys(y.formState.errors).length===0&&(l(I.fetchState==="Error"),B())},H=()=>{Ce()&&Object.keys(y.formState.errors).length===0&&(l(!1),B())};u.useEffect(()=>{const me=y.watch((X,{name:Ne})=>{Ne!=null&&X!=null&&o.defer(()=>ce(Ne,X))});return()=>{me.unsubscribe()}}),u.useEffect(()=>{f.isCustomerCreationDisabled===!0&&(y.resetField("customerSection",{defaultValue:fo(e)[De],keepDirty:!0}),y.clearErrors("customerSection"))},[f.isCustomerCreationDisabled]),u.useEffect(()=>{te(f.isSubsidiary===!0),f.isSubsidiary!==!0&&y.resetField("customerSection.company",{defaultValue:fo(e)[De].company,keepDirty:!0}),y.resetField("customerSection.entityType",{defaultValue:fo(e)[De].entityType,keepDirty:!0})},[f.isSubsidiary]),u.useEffect(()=>{j.fetchState==="Completed"&&(y.reset(fo(e)),ne||de())},[j.fetchState]),u.useEffect(()=>{v.selectedStep==="STEP_1"?re.current?.scrollIntoView():v.selectedStep==="STEP_2"?Z.current?.scrollIntoView():v.selectedStep==="STEP_3"&&ie.current?.scrollIntoView()},[]),u.useEffect(()=>{const me=w?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed;if(F?.saveConnectionState==="Error"){const Ne={firstName:f.customerName?.firstName??pe.empty,lastName:f.customerName?.lastName??pe.empty,customerEmail:y.getValues()[De].email??pe.empty,qboConnectionResponseMessage:Re.qboErrorText,isSuccess:!1};i?.trackOnboardingZeniManagedQBOConnection(Ne)}else if(me??!1){const Ne={firstName:f.customerName?.firstName??pe.empty,lastName:f.customerName?.lastName??pe.empty,customerEmail:y.getValues()[De].email??pe.empty,qboConnectionResponseMessage:Re.qboSuccessText,isSuccess:!0};i?.trackOnboardingZeniManagedQBOConnection(Ne)}},[F?.saveConnectionState,w?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed]),u.useEffect(()=>{if(f.accountingConnectionCreationMode){const me=w?.company.companyOnboardingInfo.onboardingInfo?.accountingConnectionCreationMode??pe.empty;if(f.accountingConnectionCreationMode!==me){const X={firstName:f.customerName?.firstName??pe.empty,lastName:f.customerName?.lastName??pe.empty,customerEmail:y.getValues()[De].email??pe.empty,isZeniOrCustomer:f.accountingConnectionCreationMode??pe.empty};i?.trackOnboardingQBOConnectionSelected(X)}}},[f.accountingConnectionCreationMode]);const ue=(me,X)=>{const{fetchState:Ne}=me,{isEmailGroupCreated:Qe,selectedProducts:Ke}=X,Et=Ne!=="Completed"&&Qe==null,no=Ke==null||Ke.length===0,Ut=(Ke?.includes("zeni_checking")===!0||Ke?.includes("zeni_treasury")===!0||Ke?.includes("zeni_cards")===!0||Ke?.includes("zeni_payroll")===!0||Ke?.includes("zeni_cfo")===!0||Ke?.includes("zeni_tax")===!0)&&Ke?.includes("bookkeeping")===!1;return Et||no||Ut},Le=u.useMemo(()=>{const me=y.formState.isValid,X=f.selectedProducts!=null&&(f.selectedProducts.includes("zeni_payroll")===!0||f.selectedProducts.includes("zeni_cfo")===!0||f.selectedProducts.includes("zeni_tax")===!0),Ne=f.selectedProducts!=null&&(f.selectedProducts.includes("zeni_checking")===!0||f.selectedProducts.includes("zeni_cards")===!0||X)&&f.selectedProducts.includes("bookkeeping")===!1;return me!==!0||j.fetchState==="In-Progress"||j.fetchState==="Error"||A==="In-Progress"||A==="Error"||$!==!0||f.selectedProducts==null||f.selectedProducts.length===0||f.accountingConnectionCreationMode==null&&!Ne||f.accountingConnectionCreationMode==="zeni_user"&&V!==!0&&!Ne||j.fetchState==="Completed"&&ne||w?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted===!0},[j.fetchState,ne,$,A,y.formState.isValid,f.accountingConnectionCreationMode,V,f.selectedProducts,w?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted]),Be=u.useMemo(()=>I.fetchState!=="In-Progress"&&I.fetchState!=="Error"&&A!=="In-Progress"&&A!=="Error"&&j.fetchState!=="In-Progress"&&ne===!0,[j.fetchState,ne,A,I.fetchState]);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[P===!0?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:Re.discardTitle}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Re.discardDescription}),primaryButtonText:Re.delete,secondaryButtonText:Qr.cancel,proceedButtonVariant:"destructive",action:U,style:{background:t.Colors.overlayDark}}):null,Q===!0?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{style:{paddingLeft:t.Space.sp6,paddingRight:t.Space.sp6},children:Re.confirmationPopup.title}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Re.confirmationPopup.subTitle}),primaryButtonText:DC,secondaryButtonText:AC,action:_,style:{background:t.Colors.overlayDark}}):null,o.jsxRuntimeExports.jsx(t.NavBarWithClose,{title:n==="create"?Re.customer.modalNewCustomerText:Re.customer.modalEditCustomerText,backgroundColor:g.colors.grey5,style:{zIndex:4},onCloseClick:()=>{Object.keys(y.formState.dirtyFields).length>0?N(!0):(y.reset(),d())}}),o.jsxRuntimeExports.jsxs(NC,{children:[o.jsxRuntimeExports.jsx(MC,{children:Re.customer.subTitle}),o.jsxRuntimeExports.jsx(o.FormProvider,{...y,children:o.jsxRuntimeExports.jsxs("form",{id:`${Jr}_form`,onSubmit:O,children:[o.jsxRuntimeExports.jsx(_2,{localData:e,labelWidth:C,onCompanyDomainBlurred:Se,primaryEmailDomainAdditionalLabel:q,isOnboardingAllowedForUser:$}),Be===!0?o.jsxRuntimeExports.jsxs(Qn,{children:[o.jsxRuntimeExports.jsxs(Jn,{children:[o.jsxRuntimeExports.jsxs(ei,{children:[o.jsxRuntimeExports.jsx(qn,{}),o.jsxRuntimeExports.jsx(t.StandardMedium,{children:Re.customer.groupCreationError})]}),o.jsxRuntimeExports.jsx(FC,{children:$e})]}),o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:g.colors.champion,borderColor:g.colors.champion,color:g.mode==="light"?t.darkColors.primary:t.lightColors.primary,height:"30px",width:t.Space.sp7},label:Qr.view,size:"small",onClick:()=>{c(xe?"management":"onboarding")}})]}):null,j.fetchState==="Error"||A==="Error"||I.fetchState==="Error"&&e.error!=null&&e.error?.code!==406?o.jsxRuntimeExports.jsxs(Qn,{children:[o.jsxRuntimeExports.jsx(Jn,{children:o.jsxRuntimeExports.jsxs(ei,{children:[o.jsxRuntimeExports.jsx(qn,{}),o.jsxRuntimeExports.jsx(t.LargeMedium,{children:Re.customer.emailgroupAPIError})]})}),o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:g.colors.champion,borderColor:g.colors.champion,color:g.mode==="light"?t.darkColors.primary:t.lightColors.primary},label:Re.customer.tryAgainText,size:"small",onClick:Ie})]}):null,I.fetchState==="Error"&&e.error!=null&&e.error?.code===406?o.jsxRuntimeExports.jsxs(Qn,{children:[o.jsxRuntimeExports.jsx(qn,{}),o.jsxRuntimeExports.jsxs(Jn,{children:[o.jsxRuntimeExports.jsx(t.LargeMedium,{children:z!==pe.empty?Re.customer.preOnboardingError:Re.customer.preOnboardingSaveError}),z!==pe.empty?o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:g.colors.champion,borderColor:g.colors.champion,color:g.mode==="light"?t.darkColors.primary:t.lightColors.primary},label:z,size:"small",onClick:fe}):null]})]}):null,o.jsxRuntimeExports.jsx(ya,{groupEmailAdditionalLabel:M,groupNameAdditionalLabel:D,labelWidth:C,localData:e,ref:re,sectionId:lt}),o.jsxRuntimeExports.jsx(Sa,{localData:e,onboardedCompanies:E.companies,isSubsidiary:T,labelWidth:C,largeLabelWidth:b,extraLargeLabelWidth:S,realmIdAdditionalLabel:R,productsAdditionalLabel:W,ref:Z,sectionId:De,isDisabled:$===!1?"disabled":void 0}),o.jsxRuntimeExports.jsx(zC,{children:o.jsxRuntimeExports.jsx(yC,{isSectionDisabled:ue(j,f),sectionId:fa,isLoading:r===!0||F?.fetchState==="In-Progress"||F?.saveConnectionState==="In-Progress",accountingConnectionCreationMode:e.newOnboardingCustomerLocalData.accountingConnectionCreationMode,onQBOConnectClick:x,isConnected:w?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed===!0,isInviteSent:w?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0||w?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted===!0,saveConnectionState:F?.saveConnectionState})})]})})]}),o.jsxRuntimeExports.jsx(t.Footer,{formId:`${Jr}_form`,primaryBtn:{label:w?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0?Re.customer.resendInviteBtnText:Re.customer.sendInviteBtnText,style:{width:yo.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isLoading:I.fetchState==="In-Progress",isDisabled:Le},cancelBtn:{label:Re.customer.saveBtnText,style:{width:yo.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isDisabled:!(t.formHasDirtyFields(y.formState.dirtyFields)||e.emailGroupFetchState.fetchState==="Completed"),isLoading:A==="In-Progress"&&r===!1,shouldResetOnCancel:!1,onClick:H,reverseSpinnerColor:!1}})]})}const fo=e=>{const{newOnboardingCustomerLocalData:n,onboardingCompletedCompanies:r}=e;let i;const a=r.companies.find(d=>d.companyInfo.companyId===n.parentCompanyId);return a!=null&&(i={label:a.companyInfo.name,value:a.companyInfo.companyId}),{[LC]:{companyDomain:n.companyEmailDomain??pe.empty},[lt]:{groupName:n.groupName??pe.empty,groupEmail:n.groupId??pe.empty,groupDescription:n.groupDescription??pe.empty},[De]:{name:n.name??pe.empty,entityType:{allOptions:[{label:Re.customer.parent,value:Re.customer.parent},{label:Re.customer.subsidiary,value:Re.customer.subsidiary}],selectedOption:n.isSubsidiary===!0?{label:Re.customer.subsidiary,value:Re.customer.subsidiary}:{label:Re.customer.parent,value:Re.customer.parent}},company:{selectedOption:i,allOptions:r.companies.map(d=>({label:d.companyInfo.name,value:d.companyInfo.companyId}))},realmId:n.qboRealmId??pe.empty,confirmRealmId:n.qboRealmId??pe.empty,chargebeeId:n.chargebeeId??pe.empty,hubSpotId:n.hubSpotId??pe.empty,email:n.email??pe.empty,customerName:n.customerName??{firstName:pe.empty,lastName:pe.empty},products:{allOptions:xn(e.allProductsList,n.selectedProducts??[]),selectedOptions:n.selectedProducts??[]}},[fa]:{accountingConnectionCreationMode:n.accountingConnectionCreationMode}}},NC=s.div`
|
|
4126
|
+
`,Qr=t.appLocale.getLocalizedStrings().common,Jr="onboardingCustomerPage",LC="companySection",lt="groupSection",Ae="customerSection",fa="qboConnectionSection",yo={labelWidth:new t.ResponsiveSized(120,180),largeLabelWidth:new t.ResponsiveSized(120,210,210),extraLargeLabelWidth:new t.ResponsiveSized(240,240,240),descriptionMarginBottom:new t.ResponsiveSized(20,t.sp[3]),titleFontSize:new t.ResponsiveSized(t.sp[3],18),titleLineHeight:new t.ResponsiveSized(t.sp[4],27),buttonWidth:new t.ResponsiveSized(135,135)},{cockpit:{onboarding:$e},common:{no:AC,yes:DC,strings:de}}=t.appLocale.getLocalizedStrings();function OC({localData:e,screenType:n,qboConnectClicked:r,analytics:i,onOnboardingCustomerDataUpdated:a,onCloseClick:d,onSaveClick:l,onViewClick:c,onCompanyDomainBlurred:p,onNavigateToPreOnboarding:m,onQBOConnectClick:x}){const g=o.useTheme(),h=t.useWindowSizeContext(),C=yo.labelWidth.value(h),b=yo.largeLabelWidth.value(h),S=yo.extraLargeLabelWidth.value(h),y=o.useForm({mode:"all",reValidateMode:"onChange",defaultValues:u.useMemo(()=>fo(e),[e])}),{emailGroupFetchState:j,newOnboardingCustomerLocalData:f,onboardingCompletedCompanies:E,isOnboardingAllowedForUser:$,fetchState:A,sendInviteFetchState:I,uiState:w,companyView:k,externalConnections:N}=e,[D,G]=u.useState(de.empty),[O,Z]=u.useState(de.empty),[q]=u.useState(de.empty),[R,T]=u.useState(de.empty),[V,W]=u.useState(de.empty),[v,L]=u.useState(!1),[J,re]=u.useState(!1),[F,K]=u.useState($e.customer.completePreOnboardingText),[H,_]=u.useState(!1),oe=u.useRef(null),ne=u.useRef(null),Y=u.useRef(null),{isExistingCustomer:le,isCustomerOnboardedSuccessfully:ce}=BC(e),fe=le&&ce?$e.customer.customerNameExistInManagementText:$e.customer.customerNameExistInOnboardingText,we=u.useMemo(()=>fe.replace("_company-domain_",f.companyEmailDomain??de.empty),[j.fetchState]),B=k?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed,Se=u.useCallback(()=>{const he=y.getValues();return he[Ae].realmId!==he[Ae].confirmRealmId?(T($e.customer.realmIdWarning),y.trigger(`${Ae}.confirmRealmId`),!1):(T(de.empty),y.clearErrors(`${Ae}.confirmRealmId`),!0)},[y]),ie=u.useCallback(()=>{const he=y.getValues();return he[Ae].entityType.selectedOption?.value=="Subsidiary"&&he[Ae].company.selectedOption==null?(y.setError("customerSection.company",{type:"required"}),!1):(y.clearErrors("customerSection.company"),!0)},[y]),ye=u.useCallback(()=>f.customerName?.firstName&&!f.customerName?.lastName||!f.customerName?.firstName&&f.customerName?.lastName?(y.trigger(`${Ae}.customerName`),!1):(f.customerName?.firstName||f.customerName?.lastName)&&!f.email?(y.trigger(`${Ae}.email`),!1):(f.customerName?.firstName||f.customerName?.lastName)&&f.email&&f.selectedProducts?.length===0?(W($e.customer.productsWarning),y.trigger(`${Ae}.products`),!1):!0,[y,f.customerName,f.email,f.selectedProducts]),Ie=u.useCallback(()=>Se()&&ie()&&ye(),[ie,Se,ye]),xe=y.handleSubmit(()=>{K($e.customer.completePreOnboardingText),Ie()&&re(!0)},()=>{Ie(),console.warn("Onboarding customer form error")}),M=y.getValues()[Ae].email??de.empty,z=(he=!1)=>{const X={companyDomain:f.companyEmailDomain??de.empty,primaryContactEmail:M},Ne={groupName:f.groupName??de.empty,groupEmail:f.groupId??de.empty,groupDescription:f.groupDescription??de.empty},Qe={firstName:f.customerName?.firstName??de.empty,lastName:f.customerName?.lastName??de.empty,customerEmail:M,companyName:f.name??de.empty,entittyType:f.isSubsidiary===!0?$e.customer.subsidiary:$e.customer.parent??de.empty,chargebeeId:f.chargebeeId??de.empty,products:f.selectedProducts??[],qboRealmId:f.qboRealmId??de.empty,hubSpotId:f.hubSpotId},Ke={isSendInvite:he,isInviteAlreadySent:k?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0,isZeniManagedQboConnectionSelected:f.accountingConnectionCreationMode==="zeni_user",isCustomerManagedQboConnectionSelected:f.accountingConnectionCreationMode==="customer",qboConnectionStatus:k?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed??!1};i?.trackOnboardingSaveOrSendInvite(X,Ne,Qe,Ke)},Ce=()=>{const he={companyEmailDomain:f.companyEmailDomain??de.empty,primaryContactEmail:M},X={groupName:f.groupName??de.empty,groupEmail:f.groupId??de.empty,groupDescription:f.groupDescription??de.empty,isCompanyEmailDomainAvailable:!0};i?.trackOnboardingNewCustomerGroupCreationCheck(he,X)},ue=()=>{let he=!0;const X=y.getValues();if(X[lt].groupEmail!==de.empty&&X[lt].groupName===de.empty)G($e.customer.groupNameWarning),y.setError("groupSection.groupName",{type:"required"}),he=!1;else if(X[lt].groupName!==de.empty&&X[lt].groupEmail===de.empty)Z($e.customer.groupEmailWarning),y.setError("groupSection.groupEmail",{type:"required"}),he=!1;else{const{error:Ne}=y.getFieldState("groupSection.groupName"),{error:Qe}=y.getFieldState("groupSection.groupEmail");(Ne==null||Ne.type==="required")&&(Qe==null||Qe.type==="required")&&(he=!1,y.clearErrors("groupSection")),G(de.empty),Z(de.empty)}return he},Q={onOkClick:()=>{L(!1),y.reset(),d()},onCancelClick:()=>{L(!1)}},P={onOkClick:()=>{re(!1),l(!0),z(!0)},onCancelClick:()=>{re(!1)}},me=async(he,X)=>{const Ne={...X};if(he.includes("groupName")&&X[lt].groupName!=de.empty&&(X[lt].groupName=X[lt].groupName.charAt(0).toUpperCase()+X[lt].groupName.slice(1)),(he.includes("groupName")||he.includes("groupEmail"))&&ue(),he.includes("confirmRealmId")&&T(de.empty),he.includes("products")&&o.isEqual(f.selectedProducts??[],X[Ae].products.selectedOptions)===!1){W(de.empty);const Qe=WC(f.selectedProducts??[],X[Ae].products.selectedOptions.map(Et=>ee.toProductTypeStrict(Et)).filter(Et=>Et!=null));Ne[Ae].products.selectedOptions=Qe;const Ke=xn(e.allProductsList,Qe);y.setValue(`${Ae}.products`,{allOptions:Ke,selectedOptions:Qe})}he.includes("realmId")&&o.has(y.formState.errors,`${Ae}.confirmRealmId`)&&y.trigger(`${Ae}.confirmRealmId`),a(Ne)},be=he=>{const{dirtyFields:X}=y.formState;X.companySection?.companyDomain===!0&&p(he)},pe=()=>{Object.keys(y.formState.errors).length===0&&(m?.(),K(de.empty))},De=()=>{j.fetchState==="Error"?p(f.companyEmailDomain):Ie()&&Object.keys(y.formState.errors).length===0&&(l(I.fetchState==="Error"),z())},je=()=>{Ie()&&Object.keys(y.formState.errors).length===0&&(l(!1),z())};u.useEffect(()=>{const he=y.watch((X,{name:Ne})=>{Ne!=null&&X!=null&&o.defer(()=>me(Ne,X))});return()=>{he.unsubscribe()}}),u.useEffect(()=>{f.isCustomerCreationDisabled===!0&&(y.resetField("customerSection",{defaultValue:fo(e)[Ae],keepDirty:!0}),y.clearErrors("customerSection"))},[f.isCustomerCreationDisabled]),u.useEffect(()=>{_(f.isSubsidiary===!0),f.isSubsidiary!==!0&&y.resetField("customerSection.company",{defaultValue:fo(e)[Ae].company,keepDirty:!0}),y.resetField("customerSection.entityType",{defaultValue:fo(e)[Ae].entityType,keepDirty:!0})},[f.isSubsidiary]),u.useEffect(()=>{j.fetchState==="Completed"&&(y.reset(fo(e)),le||Ce())},[j.fetchState]),u.useEffect(()=>{w.selectedStep==="STEP_1"?oe.current?.scrollIntoView():w.selectedStep==="STEP_2"?ne.current?.scrollIntoView():w.selectedStep==="STEP_3"&&Y.current?.scrollIntoView()},[]),u.useEffect(()=>{const he=k?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed;if(N?.saveConnectionState==="Error"){const Ne={firstName:f.customerName?.firstName??de.empty,lastName:f.customerName?.lastName??de.empty,customerEmail:y.getValues()[Ae].email??de.empty,qboConnectionResponseMessage:$e.qboErrorText,isSuccess:!1};i?.trackOnboardingZeniManagedQBOConnection(Ne)}else if(he??!1){const Ne={firstName:f.customerName?.firstName??de.empty,lastName:f.customerName?.lastName??de.empty,customerEmail:y.getValues()[Ae].email??de.empty,qboConnectionResponseMessage:$e.qboSuccessText,isSuccess:!0};i?.trackOnboardingZeniManagedQBOConnection(Ne)}},[N?.saveConnectionState,k?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed]),u.useEffect(()=>{if(f.accountingConnectionCreationMode){const he=k?.company.companyOnboardingInfo.onboardingInfo?.accountingConnectionCreationMode??de.empty;if(f.accountingConnectionCreationMode!==he){const X={firstName:f.customerName?.firstName??de.empty,lastName:f.customerName?.lastName??de.empty,customerEmail:y.getValues()[Ae].email??de.empty,isZeniOrCustomer:f.accountingConnectionCreationMode??de.empty};i?.trackOnboardingQBOConnectionSelected(X)}}},[f.accountingConnectionCreationMode]);const U=(he,X)=>{const{fetchState:Ne}=he,{isEmailGroupCreated:Qe,selectedProducts:Ke}=X,Et=Ne!=="Completed"&&Qe==null,no=Ke==null||Ke.length===0,Ut=(Ke?.includes("zeni_checking")===!0||Ke?.includes("zeni_treasury")===!0||Ke?.includes("zeni_cards")===!0||Ke?.includes("zeni_payroll")===!0||Ke?.includes("zeni_cfo")===!0||Ke?.includes("zeni_tax")===!0)&&Ke?.includes("bookkeeping")===!1;return Et||no||Ut},Ee=u.useMemo(()=>{const he=y.formState.isValid,X=f.selectedProducts!=null&&(f.selectedProducts.includes("zeni_payroll")===!0||f.selectedProducts.includes("zeni_cfo")===!0||f.selectedProducts.includes("zeni_tax")===!0),Ne=f.selectedProducts!=null&&(f.selectedProducts.includes("zeni_checking")===!0||f.selectedProducts.includes("zeni_cards")===!0||X)&&f.selectedProducts.includes("bookkeeping")===!1;return he!==!0||j.fetchState==="In-Progress"||j.fetchState==="Error"||A==="In-Progress"||A==="Error"||$!==!0||f.selectedProducts==null||f.selectedProducts.length===0||f.accountingConnectionCreationMode==null&&!Ne||f.accountingConnectionCreationMode==="zeni_user"&&B!==!0&&!Ne||j.fetchState==="Completed"&&le||k?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted===!0},[j.fetchState,le,$,A,y.formState.isValid,f.accountingConnectionCreationMode,B,f.selectedProducts,k?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted]),Be=u.useMemo(()=>I.fetchState!=="In-Progress"&&I.fetchState!=="Error"&&A!=="In-Progress"&&A!=="Error"&&j.fetchState!=="In-Progress"&&le===!0,[j.fetchState,le,A,I.fetchState]);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[v===!0?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:$e.discardTitle}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:$e.discardDescription}),primaryButtonText:$e.delete,secondaryButtonText:Qr.cancel,proceedButtonVariant:"destructive",action:Q,style:{background:t.Colors.overlayDark}}):null,J===!0?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{style:{paddingLeft:t.Space.sp6,paddingRight:t.Space.sp6},children:$e.confirmationPopup.title}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:$e.confirmationPopup.subTitle}),primaryButtonText:DC,secondaryButtonText:AC,action:P,style:{background:t.Colors.overlayDark}}):null,o.jsxRuntimeExports.jsx(t.NavBarWithClose,{title:n==="create"?$e.customer.modalNewCustomerText:$e.customer.modalEditCustomerText,backgroundColor:g.colors.grey5,style:{zIndex:4},onCloseClick:()=>{Object.keys(y.formState.dirtyFields).length>0?L(!0):(y.reset(),d())}}),o.jsxRuntimeExports.jsxs(NC,{children:[o.jsxRuntimeExports.jsx(MC,{children:$e.customer.subTitle}),o.jsxRuntimeExports.jsx(o.FormProvider,{...y,children:o.jsxRuntimeExports.jsxs("form",{id:`${Jr}_form`,onSubmit:xe,children:[o.jsxRuntimeExports.jsx(_2,{localData:e,labelWidth:C,onCompanyDomainBlurred:be,primaryEmailDomainAdditionalLabel:q,isOnboardingAllowedForUser:$}),Be===!0?o.jsxRuntimeExports.jsxs(Qn,{children:[o.jsxRuntimeExports.jsxs(Jn,{children:[o.jsxRuntimeExports.jsxs(ei,{children:[o.jsxRuntimeExports.jsx(qn,{}),o.jsxRuntimeExports.jsx(t.StandardMedium,{children:$e.customer.groupCreationError})]}),o.jsxRuntimeExports.jsx(FC,{children:we})]}),o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:g.colors.champion,borderColor:g.colors.champion,color:g.mode==="light"?t.darkColors.primary:t.lightColors.primary,height:"30px",width:t.Space.sp7},label:Qr.view,size:"small",onClick:()=>{c(ce?"management":"onboarding")}})]}):null,j.fetchState==="Error"||A==="Error"||I.fetchState==="Error"&&e.error!=null&&e.error?.code!==406?o.jsxRuntimeExports.jsxs(Qn,{children:[o.jsxRuntimeExports.jsx(Jn,{children:o.jsxRuntimeExports.jsxs(ei,{children:[o.jsxRuntimeExports.jsx(qn,{}),o.jsxRuntimeExports.jsx(t.LargeMedium,{children:$e.customer.emailgroupAPIError})]})}),o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:g.colors.champion,borderColor:g.colors.champion,color:g.mode==="light"?t.darkColors.primary:t.lightColors.primary},label:$e.customer.tryAgainText,size:"small",onClick:De})]}):null,I.fetchState==="Error"&&e.error!=null&&e.error?.code===406?o.jsxRuntimeExports.jsxs(Qn,{children:[o.jsxRuntimeExports.jsx(qn,{}),o.jsxRuntimeExports.jsxs(Jn,{children:[o.jsxRuntimeExports.jsx(t.LargeMedium,{children:F!==de.empty?$e.customer.preOnboardingError:$e.customer.preOnboardingSaveError}),F!==de.empty?o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:g.colors.champion,borderColor:g.colors.champion,color:g.mode==="light"?t.darkColors.primary:t.lightColors.primary},label:F,size:"small",onClick:pe}):null]})]}):null,o.jsxRuntimeExports.jsx(ya,{groupEmailAdditionalLabel:O,groupNameAdditionalLabel:D,labelWidth:C,localData:e,ref:oe,sectionId:lt}),o.jsxRuntimeExports.jsx(Sa,{localData:e,onboardedCompanies:E.companies,isSubsidiary:H,labelWidth:C,largeLabelWidth:b,extraLargeLabelWidth:S,realmIdAdditionalLabel:R,productsAdditionalLabel:V,ref:ne,sectionId:Ae,isDisabled:$===!1?"disabled":void 0}),o.jsxRuntimeExports.jsx(zC,{children:o.jsxRuntimeExports.jsx(yC,{isSectionDisabled:U(j,f),sectionId:fa,isLoading:r===!0||N?.fetchState==="In-Progress"||N?.saveConnectionState==="In-Progress",accountingConnectionCreationMode:e.newOnboardingCustomerLocalData.accountingConnectionCreationMode,onQBOConnectClick:x,isConnected:k?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed===!0,isInviteSent:k?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0||k?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted===!0,saveConnectionState:N?.saveConnectionState})})]})})]}),o.jsxRuntimeExports.jsx(t.Footer,{formId:`${Jr}_form`,primaryBtn:{label:k?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0?$e.customer.resendInviteBtnText:$e.customer.sendInviteBtnText,style:{width:yo.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isLoading:I.fetchState==="In-Progress",isDisabled:Ee},cancelBtn:{label:$e.customer.saveBtnText,style:{width:yo.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isDisabled:!(t.formHasDirtyFields(y.formState.dirtyFields)||e.emailGroupFetchState.fetchState==="Completed"),isLoading:A==="In-Progress"&&r===!1,shouldResetOnCancel:!1,onClick:je,reverseSpinnerColor:!1}})]})}const fo=e=>{const{newOnboardingCustomerLocalData:n,onboardingCompletedCompanies:r}=e;let i;const a=r.companies.find(d=>d.companyInfo.companyId===n.parentCompanyId);return a!=null&&(i={label:a.companyInfo.name,value:a.companyInfo.companyId}),{[LC]:{companyDomain:n.companyEmailDomain??de.empty},[lt]:{groupName:n.groupName??de.empty,groupEmail:n.groupId??de.empty,groupDescription:n.groupDescription??de.empty},[Ae]:{name:n.name??de.empty,entityType:{allOptions:[{label:$e.customer.parent,value:$e.customer.parent},{label:$e.customer.subsidiary,value:$e.customer.subsidiary}],selectedOption:n.isSubsidiary===!0?{label:$e.customer.subsidiary,value:$e.customer.subsidiary}:{label:$e.customer.parent,value:$e.customer.parent}},company:{selectedOption:i,allOptions:r.companies.map(d=>({label:d.companyInfo.name,value:d.companyInfo.companyId}))},realmId:n.qboRealmId??de.empty,confirmRealmId:n.qboRealmId??de.empty,chargebeeId:n.chargebeeId??de.empty,hubSpotId:n.hubSpotId??de.empty,email:n.email??de.empty,customerName:n.customerName??{firstName:de.empty,lastName:de.empty},products:{allOptions:xn(e.allProductsList,n.selectedProducts??[]),selectedOptions:n.selectedProducts??[]}},[fa]:{accountingConnectionCreationMode:n.accountingConnectionCreationMode}}},NC=s.div`
|
|
4124
4127
|
display: flex;
|
|
4125
4128
|
justify-content: flex-start;
|
|
4126
4129
|
height: 100%;
|
|
@@ -4215,7 +4218,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4215
4218
|
`,e3=s(t.SvgArrowRight)`
|
|
4216
4219
|
width: ${t.Space.sp4};
|
|
4217
4220
|
height: ${t.Space.sp4};
|
|
4218
|
-
`,Ca=u.forwardRef(({highlight:e,auditSummaryData:n,isAuditScoreLoadingCompleted:r,onClickAuditScore:i},a)=>{const{cockpit:d,common:l,dateFormat:{visual:c}}=t.appLocale.getLocalizedStrings(),p=t.useWindowSizeContext(),m=n.auditSummary,x=!r||n.fetchState==="In-Progress"||n.fetchState==="Not-Started",g=o.useTheme();let h;return m.bypassedAuditScore<=50?h=t.Colors.important:m.bypassedAuditScore<=75?h=t.Colors.alert:h=t.Colors.success,o.jsxRuntimeExports.jsx(_C,{ref:a,highlight:e,isAuditScoreLoading:x,onClick:()=>!x&&i(),children:o.jsxRuntimeExports.jsxs(VC,{auditPercentage:m.bypassedAuditScore,children:[o.jsxRuntimeExports.jsxs(UC,{children:[x?o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"Standard",start:x}):o.jsxRuntimeExports.jsx(HC,{children:o.jsxRuntimeExports.jsx(o.CircularProgressbar,{value:m.bypassedAuditScore,text:`${Math.ceil(m.bypassedAuditScore)}%`,strokeWidth:10,styles:o.buildStyles({rotation:.5,strokeLinecap:"butt",pathColor:h,textColor:g.colors.primary,trailColor:g.colors.grey3,textSize:t.Space.sp4})})}),o.jsxRuntimeExports.jsx(KC,{children:o.jsxRuntimeExports.jsxs(GC,{children:[o.jsxRuntimeExports.jsxs(YC,{children:[o.jsxRuntimeExports.jsx(ZC,{children:x?d.monthEndReport.auditScoreSectionLoadingTitle.replace("__date__",
|
|
4221
|
+
`,Ca=u.forwardRef(({highlight:e,auditSummaryData:n,isAuditScoreLoadingCompleted:r,onClickAuditScore:i},a)=>{const{cockpit:d,common:l,dateFormat:{visual:c}}=t.appLocale.getLocalizedStrings(),p=t.useWindowSizeContext(),m=n.auditSummary,x=!r||n.fetchState==="In-Progress"||n.fetchState==="Not-Started",g=o.useTheme();let h;return m.bypassedAuditScore<=50?h=t.Colors.important:m.bypassedAuditScore<=75?h=t.Colors.alert:h=t.Colors.success,o.jsxRuntimeExports.jsx(_C,{ref:a,highlight:e,isAuditScoreLoading:x,onClick:()=>!x&&i(),children:o.jsxRuntimeExports.jsxs(VC,{auditPercentage:m.bypassedAuditScore,children:[o.jsxRuntimeExports.jsxs(UC,{children:[x?o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"Standard",start:x}):o.jsxRuntimeExports.jsx(HC,{children:o.jsxRuntimeExports.jsx(o.CircularProgressbar,{value:m.bypassedAuditScore,text:`${Math.ceil(m.bypassedAuditScore)}%`,strokeWidth:10,styles:o.buildStyles({rotation:.5,strokeLinecap:"butt",pathColor:h,textColor:g.colors.primary,trailColor:g.colors.grey3,textSize:t.Space.sp4})})}),o.jsxRuntimeExports.jsx(KC,{children:o.jsxRuntimeExports.jsxs(GC,{children:[o.jsxRuntimeExports.jsxs(YC,{children:[o.jsxRuntimeExports.jsx(ZC,{children:x?d.monthEndReport.auditScoreSectionLoadingTitle.replace("__date__",ee.dateNow().subtract(1,"month").format(c.MMMMYYYYFormat)):d.monthEndReport.auditScoreSectionTitle}),x?null:o.jsxRuntimeExports.jsx(XC,{children:m.fixesRequired>0?`${l.strings.openingBrace}${m.fixesRequired} ${m.fixesRequired>1?l.texts.issues:l.texts.issue}${l.strings.closingBrace}`:l.strings.empty})]}),o.jsxRuntimeExports.jsx(qC,{children:o.jsxRuntimeExports.jsx(QC,{children:x?d.review.auditReportDrawer.subTitle:d.monthEndReport.auditScoreSectionSubtitle})})]})})]}),x?null:o.jsxRuntimeExports.jsx(JC,{windowSize:p,children:o.jsxRuntimeExports.jsx(e3,{width:t.Space.sp4,height:t.Space.sp4})})]})})});Ca.displayName="MonthEndReportAuditSummarySection";const t3=[...ee.SUPPORTED_ATTACHMENT_FILE_TYPES],o3=7*1024*100,n3=s.div`
|
|
4219
4222
|
width: ${t.FORM_MINIMUM_WIDTH}px;
|
|
4220
4223
|
margin: ${t.Space.sp4} ${t.Space.sp0};
|
|
4221
4224
|
`,s3=s.div`
|
|
@@ -4291,14 +4294,14 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4291
4294
|
flex-direction: column;
|
|
4292
4295
|
row-gap: ${t.Space.sp3};
|
|
4293
4296
|
display: flex;
|
|
4294
|
-
`,h3=
|
|
4297
|
+
`,h3=ve.keyframes`
|
|
4295
4298
|
0% {
|
|
4296
4299
|
transform: translateX(100%);
|
|
4297
4300
|
}
|
|
4298
4301
|
100% {
|
|
4299
4302
|
transform: translateX(0)
|
|
4300
4303
|
}
|
|
4301
|
-
`,g3=
|
|
4304
|
+
`,g3=ve.keyframes`
|
|
4302
4305
|
0% {
|
|
4303
4306
|
transform: translateX(0)
|
|
4304
4307
|
}
|
|
@@ -4316,7 +4319,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4316
4319
|
z-index: ${t.sp[2]};
|
|
4317
4320
|
min-width: ${t.COMMENTS_SECTION_MINIMUM_WIDTH}px;
|
|
4318
4321
|
max-width: ${t.COMMENTS_DRAWER_MAXIMUM_WIDTH}px;
|
|
4319
|
-
`,Jt="monthEndReportFormSection",oi="monthEndReportPage",Fe=t.appLocale.getLocalizedStrings();function y3({companyId:e,enableZeniGPTFeature:n,enableSendingMonthEndEmail:r,monthEndReportView:i,previewMode:a,customerRequestData:d,allThreadsSectionOpen:l,filterMetaData:c,newThreadMetadata:p,isAuditScoreLoadingCompleted:m,improveUsingZeniGPTClick:x,onRemoveFileAttachment:g,onUpdateFileAttachment:h,onCloseAllThreadsSection:C,previewMonthEndReport:b,saveMonthEndReport:S,onEditClick:y,onOpenFileAttachmentSnackBar:j,onClickAuditScore:f,onClickCustomerRequest:E,sendMonthEndReport:$}){const A=o.useTheme(),[I,v]=u.useState(),[w,F]=u.useState(0),[D,K]=u.useState(0),M=u.useRef(),G=u.useRef(null),q=u.useRef(null),R=u.useRef(null),{html:L,subject:W,improveUsingZeniGPTStatus:k}=i,[P,N]=u.useState(),[Q,ae]=u.useState(!1),[z,Y]=u.useState(!1),[T,te]=u.useState(!1),[re,Z]=u.useState(!1),ie=u.useRef(null),ne=u.useRef(null),xe=t.useDelayUnmount(l,250),ye=i.fetchState==="Not-Started"||i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:$e,sortedThreads:V,threadsPositions:ee,observer:ge,unresolvedThreadsMap:ve,handleRemoveFloatingThread:Ce}=t.useFloatingThreads(c,ie,!a,ye),[O,ke]=u.useState(0),B=u.useCallback(()=>{const Ge=$e.current?.[$e.current?.length-1];ke(window.scrollY+(Ge?.getBoundingClientRect()?.bottom??0))},[$e]),de=u.useCallback(()=>{l?K(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_DRAWER_MAXIMUM_WIDTH-t.sp[4])):F(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_SECTION_MINIMUM_WIDTH))},[l]);u.useEffect(()=>{de()},[l,de]),u.useEffect(()=>(window.addEventListener("resize",de),()=>{window.removeEventListener("resize",de)}),[de]),u.useEffect(()=>(window.addEventListener("scroll",B),()=>window.removeEventListener("scroll",B)),[B]);const{openThread:je,addThread:U,setOpenThread:_}=u.useContext(t.ThreadsContext),ce=t.useHandleSelection(t.MONTH_END_REPORT_CANVAS,!1,!a),Se=ie.current?.getBoundingClientRect(),fe=ce!=null&&ce.coords&&Se?{left:ce.coords.left-Se.left,top:ce.coords.top-Se.top}:void 0,Ie=u.useCallback(()=>{const Ge=window.getSelection()?.getRangeAt(0),ze=t.getSelectionData();if(!Ge||ze==null)return;const Je={...p,...ze,startPath:ze.startPath.join(),endPath:ze.endPath.join()},et=`${o.nanoid()}${t.NEW_THREAD_SUFFIX}`,vt=`cockpit_${e}`;U(et,{type:"thread",visibility:"public",id:et,roomId:vt,createdAt:new Date,updatedAt:new Date,comments:[],metadata:Je,resolved:!1}),_(et)},[U,e,p,_]),H=()=>{te(!0),setTimeout(()=>{te(!1)},2e3)};u.useEffect(()=>{je!=null&&l&&C()},[l,je,C]);const ue=k.fetchState==="In-Progress",Le=o.useForm({mode:"all",defaultValues:ni(i),values:ni(i)}),Be=Le.handleSubmit(Ge=>{const{recipientEmailList:ze,subject:Je}=Ge[Jt],et=i.auditSummaryData.auditSummary.bypassedAuditScore,vt=i.auditSummaryData.isControllerOrReviewer;if(a===!0)et>=75?$?.(P?.id):et<75&&(vt||r)&&Z(!0);else if(et>=75||et<75&&(vt||r)){const so=I?.replace(t.EMPTY_HTML_CHECKER,Fe.common.strings.empty);ze!=null&&Je!=null&&b(ze,Je,P?.id,so!=null&&so.length>0?I:void 0)}else Ke()}),me=()=>{G.current!=null&&G.current.click()},X=()=>{P!==void 0&&P!=null&&(g([P.id]),N(void 0),ae(!1))},Ne=Ge=>{const ze=Ge.target.files?Ge.target.files[0]:null;if(ze)if(!J.toSupportedAttachmentFileType(ze.type)||z)console.warn("Please select a valid file.");else{const Je=new FileReader;Je.onload=function(et){const vt=et.target?.result;if(typeof vt=="string"){const so={data:vt.split(",")[1],name:ze.name,id:J.getAttachmentFileIdByFileName(e,ze.name)};N(so),ae(!0),h([so])}},Je.readAsDataURL(ze)}},Qe=()=>{q.current&&q.current.scrollIntoView({behavior:"smooth"})},Ke=()=>{R.current&&(R.current.scrollIntoView({behavior:"smooth"}),H())},Et=()=>{const Ge=Le.getValues(),{recipientEmailList:ze,subject:Je}=Ge[Jt];ze!=null&&Je!=null&&S(ze,Je,P?.id,I)};u.useEffect(()=>{v(i.zeniRequestsHtml)},[i.zeniRequestsHtml]),u.useEffect(()=>{M.current=P},[P]),u.useEffect(()=>{N(J.mapAttachmentFileToAttachmentFilePayload(i.attachmentFile)),ae(!1)},[i.attachmentFile]),u.useEffect(()=>{z&&j()},[z,j]);const no=J.dateNow().subtract(1,"month").format(Fe.dateFormat.visual.MMMMFormat),Ut=L!=null?L.split(t.MONTH_END_EDITOR_PLACEHOLDER):[],wa=i.concatenatedHtml,ka=()=>i.lastDraftSavedDate!=null&&a===!1?o.jsxRuntimeExports.jsx(t.UserWithTimestamp,{time:i.lastDraftSavedDate,user:i.reportLastSavedByUser,timeStampLabel:Fe.cockpit.monthEndReport.timeStampLabel}):null,Ta={onOkClick:()=>{$?.(P?.id),Z(!1),Le.reset()},onCancelClick:()=>{y==null?Z(!1):y(),Z(!1)}};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(r3,{ref:ne,style:O>0?{height:O}:void 0,children:[o.jsxRuntimeExports.jsx(s3,{availableWidth:l?D:w}),o.jsxRuntimeExports.jsxs(n3,{children:[o.jsxRuntimeExports.jsx(o.FormProvider,{...Le,children:o.jsxRuntimeExports.jsx("form",{id:si(oi),onSubmit:Be,children:o.jsxRuntimeExports.jsxs(x3,{children:[o.jsxRuntimeExports.jsx(t.MonthEndReportSection,{sectionId:Jt,previewMode:a,subject:W}),a?null:o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Ca,{ref:R,highlight:T,onClickAuditScore:f,auditSummaryData:i.auditSummaryData,isAuditScoreLoadingCompleted:m}),o.jsxRuntimeExports.jsx(t.MonthEndReportCustomerRequestSection,{totalItems:(i.zeniRequestsData??[]).length+t.getTemplatesFromTemplatedData(i.companyMonthEndReportTemplatesData).length,onClickCustomerRequest:E})]}),o.jsxRuntimeExports.jsxs(l3,{id:t.MONTH_END_REPORT_CANVAS,ref:ie,children:[o.jsxRuntimeExports.jsxs(c3,{className:"monthEndReportCanvasWrapper",children:[P!=null||z?o.jsxRuntimeExports.jsx(d3,{onClick:Qe,children:o.jsxRuntimeExports.jsx(t.CircleWithAttachmentSuccessIcon,{fileSizeError:z,setFileSizeError:Y,loading:!1,showAnimation:!a&&Q})}):null,a?o.jsxRuntimeExports.jsx(ti,{dangerouslySetInnerHTML:{__html:t.getHTMLWithCommentingSections(wa)}}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(a3,{id:t.MONTH_END_EMAIL_HEADER_SECTION,children:[o.jsxRuntimeExports.jsx(t.StandardRegular,{dangerouslySetInnerHTML:{__html:Ut[0]!=null?Ut[0]+"</body></html>":Fe.common.strings.empty}}),o.jsxRuntimeExports.jsxs(i3,{children:[o.jsxRuntimeExports.jsx(m3,{children:Fe.cockpit.monthEndReport.editorTitle}),o.jsxRuntimeExports.jsx(u3,{children:Fe.cockpit.monthEndReport.editorNote})]})]}),o.jsxRuntimeExports.jsx(p3,{id:t.MONTH_END_EMAIL_EDITOR_SECTION,children:o.jsxRuntimeExports.jsx(t.Editor,{handleFileInputClick:me,fileAttached:P!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:ue,initialHtmlString:i.zeniRequestsHtml,improveUsingZeniGPTClick:x,setZeniRequestsHtml:v,customerRequestData:d})}),o.jsxRuntimeExports.jsx(ti,{id:t.MONTH_END_EMAIL_BODY_SECTION,dangerouslySetInnerHTML:{__html:Ut[1]!=null?"<html><body>"+Ut[1]:Fe.common.strings.empty}})]}),P!=null?o.jsxRuntimeExports.jsx(t.FileAttachment,{ref:q,fileName:P.name,fileSize:t.base64FileSize(P.data),onRemove:X,isRemovable:!a}):null]}),fe?o.jsxRuntimeExports.jsx(t.AddThreadFloating,{style:{zIndex:15},coords:fe,alignment:ce.alignment,onClick:Ie}):null,o.jsxRuntimeExports.jsx(t.TextHighlightSection,{canvasContainerRef:ie,sortedThreads:V,editorMode:!a})]})]})})}),o.jsxRuntimeExports.jsx(t.FileInputElement,{name:P?.name??Fe.common.strings.empty,fileRef:G,sizeLimit:o3,acceptableTypes:t3,onFileChange:async Ge=>{Ne(Ge)},onFileSizeError:Ge=>Y(Ge),multiple:!1})]}),xe?o.jsxRuntimeExports.jsx(S3,{allThreadsSectionOpen:l,children:o.jsxRuntimeExports.jsx(t.AllThreadsSection,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${A.colors.grey3}`,boxShadow:`${t.Space.sp0} 1px 2px ${t.Space.sp0} ${t.Colors.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${t.Space.sp5} - ${t.Space.sp5})`,backgroundColor:A.colors.background},threadsContainerStyle:{paddingBottom:a?"160px":t.Space.sp12},collapsibleThreadStyle:{width:`calc(100% - ${t.Space.sp4})`},allowComposer:!1,drawerTitle:Fe.common.texts.comments,filter:c,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Ge,ze)=>{_(ze);const Je=V.findIndex(et=>et[0]===ze);C(),$e.current?.[Je]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>C()})}):o.jsxRuntimeExports.jsx(t.FloatingThreads,{observer:ge,canvasContainerRef:ie,sortedThreads:V,threadsPositions:ee,threadsRefs:$e,unresolvedThreadsMap:ve,editorMode:!a,style:{minWidth:`${t.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${ie.current?.offsetTop}px`},handleRemoveFloatingThread:Ce})]}),re?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:Fe.cockpit.monthEndReport.sendMonthInsightsTitle.replace("__month__",no)}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Fe.cockpit.monthEndReport.sendMonthInsightsDescription.replace("__month__",no)}),primaryButtonText:Fe.cockpit.monthEndReport.sendAnyway,primaryButtonWidth:124,secondaryButtonWidth:124,proceedButtonVariant:"destructive",secondaryButtonText:Fe.cockpit.monthEndReport.editButtonLabel,action:Ta,containerStyle:{minWidth:356}}):null,o.jsxRuntimeExports.jsx(t.Footer,{style:{zIndex:10},leftSideComponent:ka(),formId:si(oi),helperText:a===!0?Fe.cockpit.monthEndReport.reportSentDateInfo:void 0,cancelBtn:{isDisabled:!m||ue,label:a===!0?Fe.cockpit.monthEndReport.editButtonLabel:Fe.cockpit.monthEndReport.saveChanges,onClick:a===!0?y:Et,style:{width:"225px"},size:"medium",isLoading:i.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:!m||ue,isLoading:a===!0?i.sendMonthEndReportStatus.fetchState==="In-Progress":i.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:a===!0?"unset":"225px"},label:a===!0?Fe.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",no):Fe.cockpit.monthEndReport.preview,size:"medium"}})]})}const ni=e=>({[Jt]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Fe.common.strings.empty}}),si=e=>`${e}_form`,f3=s(t.SmallRegular)`
|
|
4322
|
+
`,Jt="monthEndReportFormSection",oi="monthEndReportPage",Fe=t.appLocale.getLocalizedStrings();function y3({companyId:e,enableZeniGPTFeature:n,enableSendingMonthEndEmail:r,monthEndReportView:i,previewMode:a,customerRequestData:d,allThreadsSectionOpen:l,filterMetaData:c,newThreadMetadata:p,isAuditScoreLoadingCompleted:m,improveUsingZeniGPTClick:x,onRemoveFileAttachment:g,onUpdateFileAttachment:h,onCloseAllThreadsSection:C,previewMonthEndReport:b,saveMonthEndReport:S,onEditClick:y,onOpenFileAttachmentSnackBar:j,onClickAuditScore:f,onClickCustomerRequest:E,sendMonthEndReport:$}){const A=o.useTheme(),[I,w]=u.useState(),[k,N]=u.useState(0),[D,G]=u.useState(0),O=u.useRef(),Z=u.useRef(null),q=u.useRef(null),R=u.useRef(null),{html:T,subject:V,improveUsingZeniGPTStatus:W}=i,[v,L]=u.useState(),[J,re]=u.useState(!1),[F,K]=u.useState(!1),[H,_]=u.useState(!1),[oe,ne]=u.useState(!1),Y=u.useRef(null),le=u.useRef(null),ce=t.useDelayUnmount(l,250),fe=i.fetchState==="Not-Started"||i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:we,sortedThreads:B,threadsPositions:Se,observer:ie,unresolvedThreadsMap:ye,handleRemoveFloatingThread:Ie}=t.useFloatingThreads(c,Y,!a,fe),[xe,M]=u.useState(0),z=u.useCallback(()=>{const Ge=we.current?.[we.current?.length-1];M(window.scrollY+(Ge?.getBoundingClientRect()?.bottom??0))},[we]),Ce=u.useCallback(()=>{l?G(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_DRAWER_MAXIMUM_WIDTH-t.sp[4])):N(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_SECTION_MINIMUM_WIDTH))},[l]);u.useEffect(()=>{Ce()},[l,Ce]),u.useEffect(()=>(window.addEventListener("resize",Ce),()=>{window.removeEventListener("resize",Ce)}),[Ce]),u.useEffect(()=>(window.addEventListener("scroll",z),()=>window.removeEventListener("scroll",z)),[z]);const{openThread:ue,addThread:Q,setOpenThread:P}=u.useContext(t.ThreadsContext),me=t.useHandleSelection(t.MONTH_END_REPORT_CANVAS,!1,!a),be=Y.current?.getBoundingClientRect(),pe=me!=null&&me.coords&&be?{left:me.coords.left-be.left,top:me.coords.top-be.top}:void 0,De=u.useCallback(()=>{const Ge=window.getSelection()?.getRangeAt(0),ze=t.getSelectionData();if(!Ge||ze==null)return;const Je={...p,...ze,startPath:ze.startPath.join(),endPath:ze.endPath.join()},et=`${o.nanoid()}${t.NEW_THREAD_SUFFIX}`,vt=`cockpit_${e}`;Q(et,{type:"thread",visibility:"public",id:et,roomId:vt,createdAt:new Date,updatedAt:new Date,comments:[],metadata:Je,resolved:!1}),P(et)},[Q,e,p,P]),je=()=>{_(!0),setTimeout(()=>{_(!1)},2e3)};u.useEffect(()=>{ue!=null&&l&&C()},[l,ue,C]);const U=W.fetchState==="In-Progress",Ee=o.useForm({mode:"all",defaultValues:ni(i),values:ni(i)}),Be=Ee.handleSubmit(Ge=>{const{recipientEmailList:ze,subject:Je}=Ge[Jt],et=i.auditSummaryData.auditSummary.bypassedAuditScore,vt=i.auditSummaryData.isControllerOrReviewer;if(a===!0)et>=75?$?.(v?.id):et<75&&(vt||r)&&ne(!0);else if(et>=75||et<75&&(vt||r)){const so=I?.replace(t.EMPTY_HTML_CHECKER,Fe.common.strings.empty);ze!=null&&Je!=null&&b(ze,Je,v?.id,so!=null&&so.length>0?I:void 0)}else Ke()}),he=()=>{Z.current!=null&&Z.current.click()},X=()=>{v!==void 0&&v!=null&&(g([v.id]),L(void 0),re(!1))},Ne=Ge=>{const ze=Ge.target.files?Ge.target.files[0]:null;if(ze)if(!ee.toSupportedAttachmentFileType(ze.type)||F)console.warn("Please select a valid file.");else{const Je=new FileReader;Je.onload=function(et){const vt=et.target?.result;if(typeof vt=="string"){const so={data:vt.split(",")[1],name:ze.name,id:ee.getAttachmentFileIdByFileName(e,ze.name)};L(so),re(!0),h([so])}},Je.readAsDataURL(ze)}},Qe=()=>{q.current&&q.current.scrollIntoView({behavior:"smooth"})},Ke=()=>{R.current&&(R.current.scrollIntoView({behavior:"smooth"}),je())},Et=()=>{const Ge=Ee.getValues(),{recipientEmailList:ze,subject:Je}=Ge[Jt];ze!=null&&Je!=null&&S(ze,Je,v?.id,I)};u.useEffect(()=>{w(i.zeniRequestsHtml)},[i.zeniRequestsHtml]),u.useEffect(()=>{O.current=v},[v]),u.useEffect(()=>{L(ee.mapAttachmentFileToAttachmentFilePayload(i.attachmentFile)),re(!1)},[i.attachmentFile]),u.useEffect(()=>{F&&j()},[F,j]);const no=ee.dateNow().subtract(1,"month").format(Fe.dateFormat.visual.MMMMFormat),Ut=T!=null?T.split(t.MONTH_END_EDITOR_PLACEHOLDER):[],wa=i.concatenatedHtml,ka=()=>i.lastDraftSavedDate!=null&&a===!1?o.jsxRuntimeExports.jsx(t.UserWithTimestamp,{time:i.lastDraftSavedDate,user:i.reportLastSavedByUser,timeStampLabel:Fe.cockpit.monthEndReport.timeStampLabel}):null,Ta={onOkClick:()=>{$?.(v?.id),ne(!1),Ee.reset()},onCancelClick:()=>{y==null?ne(!1):y(),ne(!1)}};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(r3,{ref:le,style:xe>0?{height:xe}:void 0,children:[o.jsxRuntimeExports.jsx(s3,{availableWidth:l?D:k}),o.jsxRuntimeExports.jsxs(n3,{children:[o.jsxRuntimeExports.jsx(o.FormProvider,{...Ee,children:o.jsxRuntimeExports.jsx("form",{id:si(oi),onSubmit:Be,children:o.jsxRuntimeExports.jsxs(x3,{children:[o.jsxRuntimeExports.jsx(t.MonthEndReportSection,{sectionId:Jt,previewMode:a,subject:V}),a?null:o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Ca,{ref:R,highlight:H,onClickAuditScore:f,auditSummaryData:i.auditSummaryData,isAuditScoreLoadingCompleted:m}),o.jsxRuntimeExports.jsx(t.MonthEndReportCustomerRequestSection,{totalItems:(i.zeniRequestsData??[]).length+t.getTemplatesFromTemplatedData(i.companyMonthEndReportTemplatesData).length,onClickCustomerRequest:E})]}),o.jsxRuntimeExports.jsxs(l3,{id:t.MONTH_END_REPORT_CANVAS,ref:Y,children:[o.jsxRuntimeExports.jsxs(c3,{className:"monthEndReportCanvasWrapper",children:[v!=null||F?o.jsxRuntimeExports.jsx(d3,{onClick:Qe,children:o.jsxRuntimeExports.jsx(t.CircleWithAttachmentSuccessIcon,{fileSizeError:F,setFileSizeError:K,loading:!1,showAnimation:!a&&J})}):null,a?o.jsxRuntimeExports.jsx(ti,{dangerouslySetInnerHTML:{__html:t.getHTMLWithCommentingSections(wa)}}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(a3,{id:t.MONTH_END_EMAIL_HEADER_SECTION,children:[o.jsxRuntimeExports.jsx(t.StandardRegular,{dangerouslySetInnerHTML:{__html:Ut[0]!=null?Ut[0]+"</body></html>":Fe.common.strings.empty}}),o.jsxRuntimeExports.jsxs(i3,{children:[o.jsxRuntimeExports.jsx(m3,{children:Fe.cockpit.monthEndReport.editorTitle}),o.jsxRuntimeExports.jsx(u3,{children:Fe.cockpit.monthEndReport.editorNote})]})]}),o.jsxRuntimeExports.jsx(p3,{id:t.MONTH_END_EMAIL_EDITOR_SECTION,children:o.jsxRuntimeExports.jsx(t.Editor,{handleFileInputClick:he,fileAttached:v!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:U,initialHtmlString:i.zeniRequestsHtml,improveUsingZeniGPTClick:x,setZeniRequestsHtml:w,customerRequestData:d})}),o.jsxRuntimeExports.jsx(ti,{id:t.MONTH_END_EMAIL_BODY_SECTION,dangerouslySetInnerHTML:{__html:Ut[1]!=null?"<html><body>"+Ut[1]:Fe.common.strings.empty}})]}),v!=null?o.jsxRuntimeExports.jsx(t.FileAttachment,{ref:q,fileName:v.name,fileSize:t.base64FileSize(v.data),onRemove:X,isRemovable:!a}):null]}),pe?o.jsxRuntimeExports.jsx(t.AddThreadFloating,{style:{zIndex:15},coords:pe,alignment:me.alignment,onClick:De}):null,o.jsxRuntimeExports.jsx(t.TextHighlightSection,{canvasContainerRef:Y,sortedThreads:B,editorMode:!a})]})]})})}),o.jsxRuntimeExports.jsx(t.FileInputElement,{name:v?.name??Fe.common.strings.empty,fileRef:Z,sizeLimit:o3,acceptableTypes:t3,onFileChange:async Ge=>{Ne(Ge)},onFileSizeError:Ge=>K(Ge),multiple:!1})]}),ce?o.jsxRuntimeExports.jsx(S3,{allThreadsSectionOpen:l,children:o.jsxRuntimeExports.jsx(t.AllThreadsSection,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${A.colors.grey3}`,boxShadow:`${t.Space.sp0} 1px 2px ${t.Space.sp0} ${t.Colors.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${t.Space.sp5} - ${t.Space.sp5})`,backgroundColor:A.colors.background},threadsContainerStyle:{paddingBottom:a?"160px":t.Space.sp12},collapsibleThreadStyle:{width:`calc(100% - ${t.Space.sp4})`},allowComposer:!1,drawerTitle:Fe.common.texts.comments,filter:c,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Ge,ze)=>{P(ze);const Je=B.findIndex(et=>et[0]===ze);C(),we.current?.[Je]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>C()})}):o.jsxRuntimeExports.jsx(t.FloatingThreads,{observer:ie,canvasContainerRef:Y,sortedThreads:B,threadsPositions:Se,threadsRefs:we,unresolvedThreadsMap:ye,editorMode:!a,style:{minWidth:`${t.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${Y.current?.offsetTop}px`},handleRemoveFloatingThread:Ie})]}),oe?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:Fe.cockpit.monthEndReport.sendMonthInsightsTitle.replace("__month__",no)}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Fe.cockpit.monthEndReport.sendMonthInsightsDescription.replace("__month__",no)}),primaryButtonText:Fe.cockpit.monthEndReport.sendAnyway,primaryButtonWidth:124,secondaryButtonWidth:124,proceedButtonVariant:"destructive",secondaryButtonText:Fe.cockpit.monthEndReport.editButtonLabel,action:Ta,containerStyle:{minWidth:356}}):null,o.jsxRuntimeExports.jsx(t.Footer,{style:{zIndex:10},leftSideComponent:ka(),formId:si(oi),helperText:a===!0?Fe.cockpit.monthEndReport.reportSentDateInfo:void 0,cancelBtn:{isDisabled:!m||U,label:a===!0?Fe.cockpit.monthEndReport.editButtonLabel:Fe.cockpit.monthEndReport.saveChanges,onClick:a===!0?y:Et,style:{width:"225px"},size:"medium",isLoading:i.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:!m||U,isLoading:a===!0?i.sendMonthEndReportStatus.fetchState==="In-Progress":i.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:a===!0?"unset":"225px"},label:a===!0?Fe.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",no):Fe.cockpit.monthEndReport.preview,size:"medium"}})]})}const ni=e=>({[Jt]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Fe.common.strings.empty}}),si=e=>`${e}_form`,f3=s(t.SmallRegular)`
|
|
4320
4323
|
color: ${e=>e.theme.colors.hero};
|
|
4321
4324
|
display: flex;
|
|
4322
4325
|
align-items: center;
|
|
@@ -4414,7 +4417,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4414
4417
|
`,A3=s(t.SvgReload)`
|
|
4415
4418
|
width: ${t.Space.sp10};
|
|
4416
4419
|
height: ${t.Space.sp10};
|
|
4417
|
-
`,{dateFormat:D3,card:O3,cockpit:N3}=t.appLocale.getLocalizedStrings(),ri=({message:e,onReload:n})=>o.jsxRuntimeExports.jsxs(L3,{onClick:n,children:[o.jsxRuntimeExports.jsx(A3,{}),o.jsxRuntimeExports.jsx(I3,{children:e})]}),M3=e=>{const{monthEndReportView:n,companyId:r,previewMode:i,onRefresh:a,onNavigateBack:d}=e,{openThread:l,setOpenThread:c}=u.useContext(t.ThreadsContext),p=
|
|
4420
|
+
`,{dateFormat:D3,card:O3,cockpit:N3}=t.appLocale.getLocalizedStrings(),ri=({message:e,onReload:n})=>o.jsxRuntimeExports.jsxs(L3,{onClick:n,children:[o.jsxRuntimeExports.jsx(A3,{}),o.jsxRuntimeExports.jsx(I3,{children:e})]}),M3=e=>{const{monthEndReportView:n,companyId:r,previewMode:i,onRefresh:a,onNavigateBack:d}=e,{openThread:l,setOpenThread:c}=u.useContext(t.ThreadsContext),p=ee.dateNow().subtract(1,"month").format(D3.visual.MMSlashYYYYFormat),[m,x]=u.useState(!1);if(n.fetchState==="Not-Started"||n.fetchState==="In-Progress"||n.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||n.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return o.jsxRuntimeExports.jsx(nn,{children:o.jsxRuntimeExports.jsx(P3,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})})});if(n.fetchState==="Error"||n.companyMonthEndReportTemplatesData.fetchState==="Error")return o.jsxRuntimeExports.jsx(nn,{children:o.jsxRuntimeExports.jsx(ri,{onReload:a,message:O3.failedText})});if(n.html==null)return o.jsxRuntimeExports.jsx(nn,{children:o.jsxRuntimeExports.jsx(ri,{onReload:a,message:N3.monthEndReport.insightsNotAvailable})});const g={application:"cockpit",companyId:r,entityId:r,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:n.companyName,url:window.location.href,selectedRange:p},{url:h,...C}=g,b={...C},S=`cockpit_${r}`;return o.jsxRuntimeExports.jsx(Xe.RoomProvider,{id:S,children:o.jsxRuntimeExports.jsxs(nn,{children:[o.jsxRuntimeExports.jsx(ja,{companyName:n.companyName,threadMetadata:b,onAllThreadsClick:()=>{l!=null&&c(null),x(!0)},onNavigateBack:d,onRefresh:a}),o.jsxRuntimeExports.jsx(y3,{...e,allThreadsSectionOpen:m,filterMetaData:b,newThreadMetadata:g,onCloseAllThreadsSection:()=>x(!1)},i.toString())]})})},es=s.div`
|
|
4418
4421
|
display: flex;
|
|
4419
4422
|
justify-content: flex-end;
|
|
4420
4423
|
align-items: center;
|
|
@@ -4473,14 +4476,14 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4473
4476
|
position: relative;
|
|
4474
4477
|
height: fit-content;
|
|
4475
4478
|
min-height: ${t.Space.sp12};
|
|
4476
|
-
`,V3=
|
|
4479
|
+
`,V3=ve.keyframes`
|
|
4477
4480
|
0% {
|
|
4478
4481
|
transform: translateX(100%);
|
|
4479
4482
|
}
|
|
4480
4483
|
100% {
|
|
4481
4484
|
transform: translateX(0)
|
|
4482
4485
|
}
|
|
4483
|
-
`,U3=
|
|
4486
|
+
`,U3=ve.keyframes`
|
|
4484
4487
|
0% {
|
|
4485
4488
|
transform: translateX(0)
|
|
4486
4489
|
}
|
|
@@ -4537,7 +4540,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4537
4540
|
padding-bottom: ${t.Space.sp5};
|
|
4538
4541
|
`,q3=s(t.ExtraSmallRegular)`
|
|
4539
4542
|
color: ${e=>e.theme.colors.grey1};
|
|
4540
|
-
`,{common:{strings:sn,datePicker:Q3,texts:J3},dateFormat:rn,cockpit:ej,card:tj}=t.appLocale.getLocalizedStrings(),oj=({historicData:e,companyId:n,newThreadMetadata:r,containerRef:i,sortedThreads:a})=>{const{addThread:d,setOpenThread:l}=u.useContext(t.ThreadsContext),c=u.useRef(null),[p,m]=u.useState(),[x,g]=u.useState(!1),h="monthEndReportHistoricDataPage",C=t.useHandleSelection(t.MONTH_END_REPORT_CANVAS,!1,!1),b=i.current?.getBoundingClientRect(),S=C!=null&&C.coords!=null&&b?{left:C.coords.left-b.left,top:C.coords.top-b.top}:void 0,y=o.useForm({mode:"all",defaultValues:ii(e),values:ii(e)}),j=()=>{c.current&&c.current.scrollIntoView({behavior:"smooth"})};u.useEffect(()=>{m(J.mapAttachmentFileToAttachmentFilePayload(e.attachmentFile))},[e.attachmentFile]);const f=u.useCallback(()=>{const E=window.getSelection()?.getRangeAt(0),$=t.getSelectionData();if(!E||$==null)return;const A={...r,...$,startPath:$.startPath.join(),endPath:$.endPath.join()},I=`${o.nanoid()}${t.NEW_THREAD_SUFFIX}`,v=`cockpit_${n}`;d(I,{type:"thread",visibility:"public",id:I,roomId:v,createdAt:new Date,updatedAt:new Date,comments:[],metadata:A,resolved:!1}),l(I)},[d,n,r,l]);return o.jsxRuntimeExports.jsx(o.FormProvider,{...y,children:o.jsxRuntimeExports.jsx("form",{id:sj(h),children:o.jsxRuntimeExports.jsxs(Y3,{children:[o.jsxRuntimeExports.jsx(t.MonthEndReportSection,{previewMode:!0,subject:e.subject,sectionId:Jt}),o.jsxRuntimeExports.jsxs(z3,{id:t.MONTH_END_REPORT_CANVAS,ref:i,children:[o.jsxRuntimeExports.jsxs(F3,{className:"monthEndReportCanvasWrapper",children:[p!=null?o.jsxRuntimeExports.jsx(B3,{onClick:j,children:o.jsxRuntimeExports.jsx(t.CircleWithAttachmentSuccessIcon,{loading:!1,fileSizeError:x,setFileSizeError:g})}):null,o.jsxRuntimeExports.jsx(t.StandardRegular,{style:{position:"relative"},dangerouslySetInnerHTML:{__html:t.getHTMLWithCommentingSections(e.concatenatedHtml)}}),p!=null?o.jsxRuntimeExports.jsx(t.FileAttachment,{ref:c,fileName:p.name,fileSize:t.base64FileSize(p.data),isRemovable:!1}):null]}),S?o.jsxRuntimeExports.jsx(t.AddThreadFloating,{style:{zIndex:15},coords:S,alignment:C.alignment,onClick:f}):null,o.jsxRuntimeExports.jsx(t.TextHighlightSection,{canvasContainerRef:i,sortedThreads:a,editorMode:!1})]})]})})})},nj=e=>{const{monthEndReportHistoricData:n,reportSentDate:r,onRefresh:i,onNavigateBack:a,onDateChange:d}=e,l=o.useTheme(),[c,p]=u.useState(!1),[m,x]=u.useState(),g=u.useRef(null),[h,C]=u.useState(0),[b,S]=u.useState(0),y=t.useDelayUnmount(c,250),{data:j,companyId:f,companyName:E,firstMonthOfFY:$}=n,A=t.getMonthIndex(r.format(rn.visual.MMMMFormat)),I=Number(r.format(rn.visual.YYYYformat)),v=$>A?I-1:I;u.useEffect(()=>{const ie=A>0?A-1:12;x(`${o.padStart(ie.toString(),2,"0")}${sn.backspace}${I}`)},[]);const w={application:"cockpit",companyId:f,entityId:f,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:E,url:window.location.href,selectedRange:m},{url:F,...D}=w,K={...D},M=n.fetchState==="Not-Started"||n.fetchState==="In-Progress",{threadsRefs:G,sortedThreads:q,threadsPositions:R,observer:L,unresolvedThreadsMap:W,handleRemoveFloatingThread:k}=t.useFloatingThreads(K,g,!1,M),P=u.useRef(null),[N,Q]=u.useState(0),ae=u.useCallback(()=>{const ie=G.current?.[G.current?.length-1];Q(window.scrollY+(ie?.getBoundingClientRect()?.bottom??0))},[G]),z=u.useCallback(()=>{c?S(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_DRAWER_MAXIMUM_WIDTH-t.sp[4])):C(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_SECTION_MINIMUM_WIDTH))},[c]);u.useEffect(()=>{z()},[c,z]),u.useEffect(()=>(window.addEventListener("resize",z),()=>{window.removeEventListener("resize",z)}),[z]),u.useEffect(()=>(window.addEventListener("scroll",ae),()=>window.removeEventListener("scroll",ae)),[ae]);const{openThread:Y,setOpenThread:T}=u.useContext(t.ThreadsContext);u.useEffect(()=>{Y!=null&&c&&p(!1)},[c,Y,p]);const te=t.getHistoricMonthsList($,n.historicReportSentDates),re=u.useCallback((ie,ne)=>{const xe=$>ie?ne+1:ne;d(J.dateFromYearMonthDate(xe,ie-1));const ye=ie>0?ie-1:12;x(`${o.padStart(ye.toString(),2,"0")}${sn.backspace}${xe}`)},[$,d]);if(n.fetchState==="Not-Started"||n.fetchState==="In-Progress")return o.jsxRuntimeExports.jsxs(ts,{children:[o.jsxRuntimeExports.jsx(es,{children:o.jsxRuntimeExports.jsx(os,{onClick:a})}),o.jsxRuntimeExports.jsx(t.BusyIndication,{fetchState:n.fetchState,styles:{margin:t.Space.sp0}})]});if(n.fetchState==="Error")return o.jsxRuntimeExports.jsxs(ts,{children:[o.jsxRuntimeExports.jsx(es,{children:o.jsxRuntimeExports.jsx(os,{onClick:a})}),o.jsxRuntimeExports.jsx(t.ReloadContainer,{onReload:i,message:tj.failedText})]});if(j?.concatenatedHtml==null)return o.jsxRuntimeExports.jsxs(ts,{children:[o.jsxRuntimeExports.jsx(es,{children:o.jsxRuntimeExports.jsx(os,{onClick:a})}),o.jsxRuntimeExports.jsx(t.ReloadContainer,{onReload:i,message:ej.monthEndReport.insightsNotAvailable})]});const Z=`cockpit_${f}`;return o.jsxRuntimeExports.jsx(Xe.RoomProvider,{id:Z,children:o.jsxRuntimeExports.jsxs(W3,{children:[o.jsxRuntimeExports.jsx(ja,{companyName:n.companyName,onNavigateBack:a,monthCalendar:{monthAndYears:te,label:`${r.format(rn.visual.MMMformat)} ${v}`,selectedMonth:{month:A,year:v},onChange:re},threadMetadata:K,onAllThreadsClick:()=>{Y!=null&&T(null),p(!0)}}),o.jsxRuntimeExports.jsxs(K3,{ref:P,style:N>0?{height:N}:void 0,children:[o.jsxRuntimeExports.jsx(_3,{availableWidth:c?b:h}),o.jsxRuntimeExports.jsxs(G3,{children:[o.jsxRuntimeExports.jsx(oj,{historicData:j,newThreadMetadata:w,companyId:f,sortedThreads:q,containerRef:g}),o.jsxRuntimeExports.jsxs(X3,{children:[o.jsxRuntimeExports.jsx(Pi,{user:n.reportLastSentByUser}),o.jsxRuntimeExports.jsx(Z3,{}),o.jsxRuntimeExports.jsxs(q3,{children:[Q3.businessDay,sn.space,n.data?.reportSentDate!=null?J.getBusinessDayOfDate(n.data.reportSentDate):null,":",sn.space,n.data?.reportSentDate?.format(rn.visual.MMMDFormat)]})]})]}),y?o.jsxRuntimeExports.jsx(H3,{allThreadsSectionOpen:c,children:o.jsxRuntimeExports.jsx(t.AllThreadsSection,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${l.colors.grey3}`,boxShadow:`${t.Space.sp0} 1px 2px ${t.Space.sp0} ${t.Colors.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${t.Space.sp5} - ${t.Space.sp5})`,backgroundColor:l.colors.background},threadsContainerStyle:{paddingBottom:t.Space.sp5},collapsibleThreadStyle:{width:`calc(100% - ${t.Space.sp4})`},allowComposer:!1,drawerTitle:J3.comments,filter:K,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(ie,ne)=>{T(ne);const xe=q.findIndex(ye=>ye[0]===ne);p(!1),G.current?.[xe]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>p(!1)})}):o.jsxRuntimeExports.jsx(t.FloatingThreads,{observer:L,canvasContainerRef:g,sortedThreads:q,threadsPositions:R,threadsRefs:G,unresolvedThreadsMap:W,editorMode:!1,style:{minWidth:`${t.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${g.current?.offsetTop}px`},handleRemoveFloatingThread:k})]})]})})},ii=e=>({[Jt]:{recipientEmailList:e.recipientEmailList??[],subject:e.subject??""}}),sj=e=>`${e}_form`,rj=e=>le.createElement("svg",{width:98,height:121,viewBox:"0 0 98 121",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},le.createElement("path",{d:"M49.2796 0.921875C32.9744 0.921875 19.7096 14.1944 19.7096 30.5087C19.7125 35.7639 21.1132 40.9238 23.7681 45.459C26.423 49.9943 30.2365 53.7418 34.8175 56.317C34.4083 56.561 33.9588 56.7299 33.4901 56.8156C26.6518 57.6437 22.4965 58.8342 19.5952 60.7958C16.8429 62.6568 15.2375 65.1511 14.0552 69.4056C14.0509 69.4209 14.0466 69.4363 14.0431 69.4518L10.0918 85.7362C9.51826 88.1132 9.82738 90.6176 10.9617 92.7837C12.0961 94.9499 13.9785 96.6304 16.2589 97.5129L20.1569 99.0144H10.7796C7.99797 99.0144 5.33033 100.119 3.36345 102.086C1.39658 104.053 0.291567 106.721 0.291504 109.502V110.435C0.291815 113.216 1.39693 115.884 3.36378 117.85C5.33063 119.817 7.99813 120.922 10.7796 120.922H53.2747C53.6551 120.922 54.0199 120.771 54.2889 120.502C54.5579 120.233 54.709 119.868 54.709 119.488C54.709 119.107 54.5579 118.742 54.2889 118.473C54.0199 118.204 53.6551 118.053 53.2747 118.053H34.0289C38.6739 116.234 43.0832 113.862 47.1618 110.989C59.9371 101.998 69.4844 101.883 69.5755 101.883H86.6115C88.6324 101.883 90.5704 102.686 91.9994 104.115C93.4283 105.544 94.2311 107.482 94.2311 109.502V110.435C94.2308 112.455 93.4279 114.393 91.999 115.822C90.5701 117.251 88.6322 118.053 86.6115 118.053H62.8365C62.4561 118.053 62.0913 118.204 61.8223 118.473C61.5533 118.742 61.4022 119.107 61.4022 119.488C61.4022 119.868 61.5533 120.233 61.8223 120.502C62.0913 120.771 62.4561 120.922 62.8365 120.922H86.6115C89.3932 120.922 92.0609 119.817 94.0278 117.85C95.9947 115.883 97.0996 113.215 97.0996 110.433V109.501C97.0996 106.72 95.9947 104.052 94.0278 102.085C92.0609 100.118 89.3932 99.013 86.6115 99.013H77.2552L81.1289 97.5124C83.4101 96.6305 85.2933 94.95 86.4283 92.7836C87.5633 90.6172 87.8728 88.1123 87.2993 85.7348L83.3471 69.4504C83.3435 69.4349 83.3393 69.42 83.335 69.4047C81.0779 61.2834 76.7211 58.4595 63.9108 56.8156C63.6617 56.7812 63.4178 56.7159 63.1848 56.6214C67.9202 54.1003 71.88 50.3378 74.6396 45.7373C77.3993 41.1368 78.8546 35.872 78.8496 30.5073C78.8496 14.1942 65.5848 0.921875 49.2796 0.921875ZM50.0808 3.84176C56.084 4.02211 61.8511 6.22111 66.4504 10.0835C71.0497 13.9459 74.2125 19.2461 75.4278 25.1278C76.6431 31.0094 75.84 37.1291 73.1483 42.498C70.4565 47.867 66.0332 52.1716 60.5931 54.7165C59.1024 53.1795 57.8049 51.1354 57.3184 49.7456C58.4778 48.8954 59.4906 47.8615 60.3167 46.6848C60.9625 46.9809 61.6621 47.1419 62.3724 47.1577C62.8095 47.1603 63.2432 47.0811 63.6512 46.9243C64.5464 46.5762 65.7044 45.6681 66.1373 43.3181C66.2624 42.9869 66.4272 42.6721 66.628 42.3806L66.7279 42.2148C68.7825 38.8099 69.2671 36.263 68.2103 34.43C67.7877 33.7064 67.1417 33.1394 66.3694 32.8142C66.4922 32.3725 66.5552 31.9163 66.5566 31.4579V29.7934C66.5566 24.4319 64.183 20.499 58.861 17.0401C58.612 16.8783 58.3989 16.667 58.235 16.4194C58.071 16.1718 57.9598 15.8931 57.9081 15.6007C57.125 11.0899 54.1033 8.50358 49.6158 8.50358H49.613C42.7338 8.50525 41.4374 13.4875 41.1983 15.6301C41.1628 15.9531 41.0576 16.2647 40.8901 16.5432C40.7227 16.8217 40.4968 17.0607 40.2282 17.2436C36.7881 19.5877 32.8393 23.1325 32.8393 29.7934V31.4579C32.8389 31.9742 32.9165 32.4876 33.0695 32.9808C32.4212 33.2864 31.8789 33.7785 31.5119 34.3941C30.4489 36.1843 30.9504 38.7427 33.0456 42.2153L33.133 42.36C33.3398 42.6607 33.5094 42.9854 33.6381 43.3269C33.9878 45.1621 34.9709 46.0635 35.7344 46.4966C36.4514 46.8873 37.2576 47.0851 38.074 47.0704C38.4264 47.0695 38.7782 47.0401 39.1259 46.9826C39.7172 47.7756 40.3958 48.4996 41.1489 49.141C40.3987 51.1167 38.8989 53.0103 37.368 54.4238C32.9251 52.2043 29.188 48.7913 26.5758 44.5673C23.9635 40.3432 22.5793 35.4752 22.5781 30.5087C22.5811 26.9366 23.3008 23.4015 24.6945 20.1126C26.0883 16.8237 28.1278 13.8479 30.6922 11.3613C33.2567 8.87477 36.294 6.92806 39.6244 5.63643C42.9547 4.34481 46.5104 3.73454 50.0808 3.84176V3.84176ZM49.6125 11.3716H49.6148C52.6985 11.3716 54.5375 12.9592 55.0811 16.0909C55.2008 16.7719 55.4592 17.4211 55.8404 17.998C56.2216 18.575 56.7174 19.0673 57.2969 19.4445C61.7759 22.3556 63.6871 25.4502 63.6871 29.793V31.4574C63.6872 31.8279 63.5967 32.1929 63.4235 32.5204C63.2502 32.8479 62.9995 33.1281 62.6931 33.3366V30.1506C62.6908 29.0631 62.4335 27.9912 61.9419 27.0212C61.4503 26.0511 60.7381 25.2098 59.8624 24.5648C57.1677 22.6285 53.7984 24.3061 53.6562 24.3785C53.605 24.4045 53.5554 24.4335 53.5077 24.4654C51.1056 26.0768 48.8478 26.0308 45.9671 24.3085C44.5197 23.32 41.5837 23.1611 39.9541 24.4266C38.9025 25.1029 38.0381 26.0333 37.4408 27.1317C36.8435 28.2302 36.5325 29.4614 36.5365 30.7118V33.2124C36.2772 32.9993 36.0684 32.7314 35.925 32.428C35.7816 32.1245 35.7073 31.793 35.7073 31.4574V29.793C35.7073 25.5322 37.4846 22.5834 41.8426 19.614C42.4535 19.1982 42.9671 18.6551 43.348 18.0219C43.7289 17.3888 43.9681 16.6806 44.0491 15.9462C44.3864 12.9103 46.258 11.3724 49.6125 11.3716ZM42.9781 26.3894C43.5413 26.3894 44.1076 26.5022 44.3521 26.6774C44.3832 26.6999 44.4156 26.7216 44.4478 26.7414C48.2475 29.0291 51.7046 29.0839 55.0125 26.9086C55.356 26.7553 57.0461 26.072 58.1756 26.8833C58.6864 27.2611 59.1017 27.7533 59.3881 28.3204C59.6746 28.8875 59.8242 29.5138 59.8251 30.1492V39.1638C59.8346 40.5106 59.5775 41.846 59.0687 43.0931C58.5599 44.3401 57.8093 45.4742 56.8603 46.4299C55.9113 47.3856 54.7826 48.1442 53.5392 48.6618C52.2957 49.1794 50.9622 49.4459 49.6153 49.4459C48.2684 49.4459 46.9349 49.1794 45.6914 48.6618C44.448 48.1442 43.3193 47.3856 42.3703 46.4299C41.4213 45.4742 40.6707 44.3401 40.1619 43.0931C39.6531 41.846 39.396 40.5106 39.4055 39.1638L39.4051 30.7118C39.4026 29.9319 39.5988 29.1642 39.9752 28.4812C40.3516 27.7981 40.8958 27.2222 41.5564 26.8077C41.6082 26.7751 41.6578 26.7393 41.7049 26.7003C41.9698 26.4814 42.4723 26.3894 42.9781 26.3894ZM64.8091 35.3101C64.9906 35.3368 65.165 35.3995 65.322 35.4944C65.4791 35.5893 65.6156 35.7146 65.7237 35.8629C65.8941 36.1581 66.2926 37.3823 64.2707 40.7329L64.1755 40.8922C63.8002 41.5108 63.4455 42.0954 63.316 42.798C63.1702 43.5909 62.9076 44.1338 62.6138 44.2495C62.3092 44.316 61.9912 44.2814 61.708 44.151C62.3602 42.5697 62.6953 40.8757 62.6941 39.1652V36.4316C63.4779 36.2303 64.2027 35.8459 64.8091 35.3101V35.3101ZM34.7204 35.4301C35.2551 35.8691 35.8732 36.1952 36.5375 36.3886V39.1652C36.536 40.8714 36.8691 42.5613 37.5179 44.1393C37.3892 44.1108 37.2652 44.0643 37.1495 44.0011C37.0209 43.9282 36.63 43.7063 36.4562 42.7896C36.3224 42.087 35.9653 41.4972 35.5869 40.873L35.5019 40.7329C33.8673 38.0236 33.6415 36.4418 33.9752 35.8652C34.0639 35.7464 34.1755 35.6466 34.3035 35.5719C34.4315 35.4971 34.5733 35.4489 34.7204 35.4301ZM43.572 50.7798C45.2964 51.6836 47.2015 52.1892 49.1472 52.2594C51.0929 52.3295 53.0295 51.9624 54.8145 51.185C55.503 52.7783 56.4174 54.2641 57.5294 55.5966C55.8184 62.7256 51.9726 67.8702 46.0773 70.8823C43.7618 72.0558 41.27 72.8428 38.7005 73.2121V57.0594C40.6315 55.4367 42.498 53.2058 43.572 50.7798ZM59.8769 57.9292C60.5403 58.4659 61.2737 58.9097 62.0568 59.2486C59.9126 69.1211 55.1295 77.1108 47.8239 83.0068C45.0554 85.2523 41.984 87.0961 38.7005 88.4838V84.0797C41.0671 83.8122 45.8154 82.543 51.2503 77.062C51.383 76.9283 51.4881 76.7698 51.5595 76.5954C51.6309 76.4211 51.6673 76.2344 51.6666 76.0461C51.6658 75.8577 51.628 75.6713 51.5552 75.4975C51.4824 75.3238 51.3761 75.1661 51.2424 75.0334C50.9723 74.7656 50.6069 74.616 50.2266 74.6176C49.8462 74.6192 49.4821 74.7718 49.2143 75.0418C44.594 79.7008 40.6461 80.8889 38.7005 81.1832V76.1086C41.683 75.7301 44.5792 74.8464 47.265 73.4955C51.6634 71.2764 57.241 66.7984 59.8769 57.9292ZM35.8339 58.9941V91.0545L33.4518 89.7005V80.5235C33.4518 80.1431 33.3007 79.7783 33.0317 79.5093C32.7628 79.2403 32.398 79.0892 32.0176 79.0892C31.6372 79.0892 31.2724 79.2403 31.0034 79.5093C30.7344 79.7783 30.5833 80.1431 30.5833 80.5235V88.0716L27.1783 86.1354L26.7446 60.8925C27.4993 60.7008 28.3155 60.524 29.199 60.3588L29.1995 60.3593V69.4906C29.1995 69.871 29.3506 70.2358 29.6196 70.5047C29.8885 70.7737 30.2533 70.9248 30.6337 70.9248C31.0141 70.9248 31.3789 70.7737 31.6479 70.5047C31.9169 70.2358 32.068 69.871 32.068 69.4906V59.8938C32.635 59.8141 33.2247 59.7373 33.837 59.6632C34.5352 59.5528 35.2101 59.3267 35.8339 58.9941V58.9941ZM64.8642 59.841C66.498 60.0748 67.9475 60.3316 69.2384 60.6147C69.0142 63.3677 67.9385 70.5555 62.8514 75.4279C62.7154 75.5582 62.6063 75.714 62.5305 75.8864C62.4546 76.0589 62.4135 76.2446 62.4094 76.4329C62.4054 76.6212 62.4384 76.8085 62.5067 76.9841C62.575 77.1596 62.6772 77.32 62.8075 77.4561C62.9378 77.5921 63.0936 77.7012 63.2661 77.777C63.4385 77.8528 63.6242 77.894 63.8125 77.898C64.0008 77.9021 64.1881 77.8691 64.3637 77.8008C64.5392 77.7324 64.6996 77.6302 64.8357 77.4999C70.3593 72.2111 71.7222 64.7855 72.0583 61.3505C73.3289 61.7263 74.5513 62.2488 75.701 62.9075C75.6503 65.9403 74.7925 77.8281 64.76 84.4532C64.5999 84.5557 64.4618 84.689 64.3537 84.8453C64.2455 85.0016 64.1696 85.1779 64.1301 85.3639C64.0907 85.5498 64.0887 85.7418 64.1241 85.9285C64.1595 86.1153 64.2317 86.2931 64.3365 86.4517C64.4413 86.6103 64.5765 86.7465 64.7344 86.8524C64.8923 86.9583 65.0696 87.0317 65.2561 87.0685C65.4426 87.1052 65.6346 87.1045 65.8208 87.0664C66.007 87.0283 66.1838 86.9535 66.3409 86.8465C71.6878 83.3153 75.4975 77.9065 77.3575 71.2059C77.8907 69.2799 78.2534 67.3108 78.4416 65.3213C79.4455 66.6635 80.0371 68.2544 80.5654 70.1498L84.512 86.4113C84.9225 88.1121 84.7011 89.904 83.8891 91.4537C83.077 93.0034 81.7296 94.2053 80.0976 94.8358L69.314 99.013H62.5825C62.5992 98.5058 62.4787 98.0035 62.2337 97.5591C61.7499 96.6821 61.1164 95.8965 60.362 95.2377L62.8458 93.7904C65.7686 95.2672 69.0004 96.0285 72.275 96.0114C72.6684 96.0114 73.0714 96.0007 73.4819 95.9777C73.6716 95.9697 73.8579 95.924 74.0299 95.8434C74.2018 95.7628 74.3561 95.6488 74.4837 95.5081C74.6112 95.3674 74.7096 95.2027 74.773 95.0237C74.8364 94.8446 74.8636 94.6548 74.8531 94.4652C74.8426 94.2755 74.7945 94.0899 74.7116 93.919C74.6287 93.7481 74.5127 93.5953 74.3703 93.4696C74.228 93.3439 74.062 93.2477 73.8822 93.1867C73.7023 93.1256 73.5121 93.1009 73.3227 93.1139C70.8018 93.2547 68.2788 92.8773 65.9095 92.005L74.692 86.8875C75.0183 86.6948 75.2549 86.3808 75.3504 86.0141C75.4459 85.6474 75.3924 85.2578 75.2015 84.9304C75.0107 84.6031 74.6981 84.3645 74.332 84.2669C73.9659 84.1693 73.576 84.2205 73.2475 84.4093L57.5066 93.5817C56.1863 93.1236 54.7739 92.9966 53.3931 93.2117C52.0124 93.4269 50.7055 93.9776 49.5873 94.8157L48.6643 95.5001C48.5304 95.4205 48.3911 95.3438 48.2422 95.2723C47.9751 95.1448 47.7037 95.0231 47.428 94.9067C56.5064 90.843 59.3085 85.1014 59.4385 84.8249C59.595 84.4822 59.6103 84.0917 59.4813 83.7378C59.3522 83.3838 59.0891 83.0949 58.7488 82.9334C58.4084 82.7719 58.0182 82.7507 57.6624 82.8745C57.3066 82.9984 57.0138 83.2572 56.8473 83.5951C56.8392 83.6116 56.0169 85.2804 53.8191 87.3596C51.8123 89.2583 48.215 91.8914 42.4529 93.732C41.8642 93.7075 41.2745 93.7357 40.6908 93.8161L38.7005 92.6844V91.5671C42.6145 90.0729 46.2659 87.9655 49.5177 85.324C54.9887 80.9385 62.0006 72.9935 64.8642 59.841ZM23.8891 61.7828L24.2795 84.4873L24.2048 84.4481C23.8664 84.265 23.4693 84.2235 23.1004 84.3327C22.7315 84.4419 22.4209 84.6929 22.2367 85.0306C22.0525 85.3684 22.0098 85.7654 22.1178 86.1347C22.2258 86.5039 22.4758 86.8153 22.813 87.0005L31.3032 91.7814C31.3173 91.7895 31.3311 91.7978 31.3457 91.8052L37.2705 95.1733C36.4189 95.8053 35.7066 96.6058 35.1779 97.525C35.1707 97.5369 35.1643 97.549 35.1574 97.5614C34.9113 98.0057 34.7871 98.5071 34.7974 99.0148H28.1392L17.2893 94.8353C15.6584 94.2042 14.3121 93.0023 13.501 91.453C12.6898 89.9038 12.469 88.1126 12.8796 86.4127L16.8257 70.1512C17.9834 65.9983 19.5804 63.4623 23.8891 61.7828ZM54.4854 95.989C55.5433 95.9455 56.5925 96.1967 57.5161 96.7145C58.4397 97.2322 59.2014 97.9963 59.7163 98.9214C59.7134 98.952 59.6656 99.0144 59.6379 99.0144H50.5122C50.5835 98.5926 50.5633 98.1605 50.4529 97.7472L51.3003 97.1193C52.2238 96.4302 53.334 96.0362 54.4854 95.989ZM41.9412 96.5926C42.1716 96.5887 42.4018 96.5962 42.6307 96.6127H42.6457H42.6471C44.1604 96.7679 45.6344 97.1896 47.0008 97.8584C47.1767 97.9369 47.3382 98.0442 47.4788 98.1758C47.5934 98.2908 47.721 98.4521 47.6763 98.5689C47.5938 98.7032 47.4786 98.8144 47.3414 98.892C47.2042 98.9697 47.0496 99.0113 46.892 99.013H37.6776V98.9705L37.6706 98.9439C38.7185 97.1942 40.3283 96.6203 41.9412 96.5926ZM10.7796 101.883H57.7358C53.4157 103.661 49.3139 105.93 45.5109 108.643C34.377 116.48 24.2433 117.936 23.334 118.053H10.7796C9.7789 118.053 8.78805 117.856 7.86358 117.473C6.93911 117.09 6.09912 116.529 5.39157 115.821C4.68403 115.114 4.12279 114.274 3.7399 113.349C3.35701 112.425 3.15997 111.434 3.16003 110.433V109.502C3.16003 107.482 3.9628 105.544 5.39174 104.115C6.82067 102.686 8.75873 101.883 10.7796 101.883V101.883ZM9.70899 105.504C9.3286 105.504 8.96379 105.655 8.69481 105.924C8.42584 106.193 8.27473 106.557 8.27473 106.938C8.27473 107.318 8.42584 107.683 8.69481 107.952C8.96379 108.221 9.3286 108.372 9.70899 108.372H10.3542C10.7346 108.372 11.0994 108.221 11.3684 107.952C11.6374 107.683 11.7885 107.318 11.7885 106.938C11.7885 106.557 11.6374 106.193 11.3684 105.924C11.0994 105.655 10.7346 105.504 10.3542 105.504H9.70899ZM14.982 105.504C14.6016 105.504 14.2368 105.655 13.9678 105.924C13.6988 106.193 13.5477 106.557 13.5477 106.938C13.5477 107.318 13.6988 107.683 13.9678 107.952C14.2368 108.221 14.6016 108.372 14.982 108.372H33.3192C33.6996 108.372 34.0644 108.221 34.3334 107.952C34.6024 107.683 34.7535 107.318 34.7535 106.938C34.7535 106.557 34.6024 106.193 34.3334 105.924C34.0644 105.655 33.6996 105.504 33.3192 105.504H14.982Z",fill:"#D4D8DD"})),ij=s.div`
|
|
4543
|
+
`,{common:{strings:sn,datePicker:Q3,texts:J3},dateFormat:rn,cockpit:ej,card:tj}=t.appLocale.getLocalizedStrings(),oj=({historicData:e,companyId:n,newThreadMetadata:r,containerRef:i,sortedThreads:a})=>{const{addThread:d,setOpenThread:l}=u.useContext(t.ThreadsContext),c=u.useRef(null),[p,m]=u.useState(),[x,g]=u.useState(!1),h="monthEndReportHistoricDataPage",C=t.useHandleSelection(t.MONTH_END_REPORT_CANVAS,!1,!1),b=i.current?.getBoundingClientRect(),S=C!=null&&C.coords!=null&&b?{left:C.coords.left-b.left,top:C.coords.top-b.top}:void 0,y=o.useForm({mode:"all",defaultValues:ii(e),values:ii(e)}),j=()=>{c.current&&c.current.scrollIntoView({behavior:"smooth"})};u.useEffect(()=>{m(ee.mapAttachmentFileToAttachmentFilePayload(e.attachmentFile))},[e.attachmentFile]);const f=u.useCallback(()=>{const E=window.getSelection()?.getRangeAt(0),$=t.getSelectionData();if(!E||$==null)return;const A={...r,...$,startPath:$.startPath.join(),endPath:$.endPath.join()},I=`${o.nanoid()}${t.NEW_THREAD_SUFFIX}`,w=`cockpit_${n}`;d(I,{type:"thread",visibility:"public",id:I,roomId:w,createdAt:new Date,updatedAt:new Date,comments:[],metadata:A,resolved:!1}),l(I)},[d,n,r,l]);return o.jsxRuntimeExports.jsx(o.FormProvider,{...y,children:o.jsxRuntimeExports.jsx("form",{id:sj(h),children:o.jsxRuntimeExports.jsxs(Y3,{children:[o.jsxRuntimeExports.jsx(t.MonthEndReportSection,{previewMode:!0,subject:e.subject,sectionId:Jt}),o.jsxRuntimeExports.jsxs(z3,{id:t.MONTH_END_REPORT_CANVAS,ref:i,children:[o.jsxRuntimeExports.jsxs(F3,{className:"monthEndReportCanvasWrapper",children:[p!=null?o.jsxRuntimeExports.jsx(B3,{onClick:j,children:o.jsxRuntimeExports.jsx(t.CircleWithAttachmentSuccessIcon,{loading:!1,fileSizeError:x,setFileSizeError:g})}):null,o.jsxRuntimeExports.jsx(t.StandardRegular,{style:{position:"relative"},dangerouslySetInnerHTML:{__html:t.getHTMLWithCommentingSections(e.concatenatedHtml)}}),p!=null?o.jsxRuntimeExports.jsx(t.FileAttachment,{ref:c,fileName:p.name,fileSize:t.base64FileSize(p.data),isRemovable:!1}):null]}),S?o.jsxRuntimeExports.jsx(t.AddThreadFloating,{style:{zIndex:15},coords:S,alignment:C.alignment,onClick:f}):null,o.jsxRuntimeExports.jsx(t.TextHighlightSection,{canvasContainerRef:i,sortedThreads:a,editorMode:!1})]})]})})})},nj=e=>{const{monthEndReportHistoricData:n,reportSentDate:r,onRefresh:i,onNavigateBack:a,onDateChange:d}=e,l=o.useTheme(),[c,p]=u.useState(!1),[m,x]=u.useState(),g=u.useRef(null),[h,C]=u.useState(0),[b,S]=u.useState(0),y=t.useDelayUnmount(c,250),{data:j,companyId:f,companyName:E,firstMonthOfFY:$}=n,A=t.getMonthIndex(r.format(rn.visual.MMMMFormat)),I=Number(r.format(rn.visual.YYYYformat)),w=$>A?I-1:I;u.useEffect(()=>{const Y=A>0?A-1:12;x(`${o.padStart(Y.toString(),2,"0")}${sn.backspace}${I}`)},[]);const k={application:"cockpit",companyId:f,entityId:f,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:E,url:window.location.href,selectedRange:m},{url:N,...D}=k,G={...D},O=n.fetchState==="Not-Started"||n.fetchState==="In-Progress",{threadsRefs:Z,sortedThreads:q,threadsPositions:R,observer:T,unresolvedThreadsMap:V,handleRemoveFloatingThread:W}=t.useFloatingThreads(G,g,!1,O),v=u.useRef(null),[L,J]=u.useState(0),re=u.useCallback(()=>{const Y=Z.current?.[Z.current?.length-1];J(window.scrollY+(Y?.getBoundingClientRect()?.bottom??0))},[Z]),F=u.useCallback(()=>{c?S(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_DRAWER_MAXIMUM_WIDTH-t.sp[4])):C(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_SECTION_MINIMUM_WIDTH))},[c]);u.useEffect(()=>{F()},[c,F]),u.useEffect(()=>(window.addEventListener("resize",F),()=>{window.removeEventListener("resize",F)}),[F]),u.useEffect(()=>(window.addEventListener("scroll",re),()=>window.removeEventListener("scroll",re)),[re]);const{openThread:K,setOpenThread:H}=u.useContext(t.ThreadsContext);u.useEffect(()=>{K!=null&&c&&p(!1)},[c,K,p]);const _=t.getHistoricMonthsList($,n.historicReportSentDates),oe=u.useCallback((Y,le)=>{const ce=$>Y?le+1:le;d(ee.dateFromYearMonthDate(ce,Y-1));const fe=Y>0?Y-1:12;x(`${o.padStart(fe.toString(),2,"0")}${sn.backspace}${ce}`)},[$,d]);if(n.fetchState==="Not-Started"||n.fetchState==="In-Progress")return o.jsxRuntimeExports.jsxs(ts,{children:[o.jsxRuntimeExports.jsx(es,{children:o.jsxRuntimeExports.jsx(os,{onClick:a})}),o.jsxRuntimeExports.jsx(t.BusyIndication,{fetchState:n.fetchState,styles:{margin:t.Space.sp0}})]});if(n.fetchState==="Error")return o.jsxRuntimeExports.jsxs(ts,{children:[o.jsxRuntimeExports.jsx(es,{children:o.jsxRuntimeExports.jsx(os,{onClick:a})}),o.jsxRuntimeExports.jsx(t.ReloadContainer,{onReload:i,message:tj.failedText})]});if(j?.concatenatedHtml==null)return o.jsxRuntimeExports.jsxs(ts,{children:[o.jsxRuntimeExports.jsx(es,{children:o.jsxRuntimeExports.jsx(os,{onClick:a})}),o.jsxRuntimeExports.jsx(t.ReloadContainer,{onReload:i,message:ej.monthEndReport.insightsNotAvailable})]});const ne=`cockpit_${f}`;return o.jsxRuntimeExports.jsx(Xe.RoomProvider,{id:ne,children:o.jsxRuntimeExports.jsxs(W3,{children:[o.jsxRuntimeExports.jsx(ja,{companyName:n.companyName,onNavigateBack:a,monthCalendar:{monthAndYears:_,label:`${r.format(rn.visual.MMMformat)} ${w}`,selectedMonth:{month:A,year:w},onChange:oe},threadMetadata:G,onAllThreadsClick:()=>{K!=null&&H(null),p(!0)}}),o.jsxRuntimeExports.jsxs(K3,{ref:v,style:L>0?{height:L}:void 0,children:[o.jsxRuntimeExports.jsx(_3,{availableWidth:c?b:h}),o.jsxRuntimeExports.jsxs(G3,{children:[o.jsxRuntimeExports.jsx(oj,{historicData:j,newThreadMetadata:k,companyId:f,sortedThreads:q,containerRef:g}),o.jsxRuntimeExports.jsxs(X3,{children:[o.jsxRuntimeExports.jsx(Pi,{user:n.reportLastSentByUser}),o.jsxRuntimeExports.jsx(Z3,{}),o.jsxRuntimeExports.jsxs(q3,{children:[Q3.businessDay,sn.space,n.data?.reportSentDate!=null?ee.getBusinessDayOfDate(n.data.reportSentDate):null,":",sn.space,n.data?.reportSentDate?.format(rn.visual.MMMDFormat)]})]})]}),y?o.jsxRuntimeExports.jsx(H3,{allThreadsSectionOpen:c,children:o.jsxRuntimeExports.jsx(t.AllThreadsSection,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${l.colors.grey3}`,boxShadow:`${t.Space.sp0} 1px 2px ${t.Space.sp0} ${t.Colors.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${t.Space.sp5} - ${t.Space.sp5})`,backgroundColor:l.colors.background},threadsContainerStyle:{paddingBottom:t.Space.sp5},collapsibleThreadStyle:{width:`calc(100% - ${t.Space.sp4})`},allowComposer:!1,drawerTitle:J3.comments,filter:G,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Y,le)=>{H(le);const ce=q.findIndex(fe=>fe[0]===le);p(!1),Z.current?.[ce]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>p(!1)})}):o.jsxRuntimeExports.jsx(t.FloatingThreads,{observer:T,canvasContainerRef:g,sortedThreads:q,threadsPositions:R,threadsRefs:Z,unresolvedThreadsMap:V,editorMode:!1,style:{minWidth:`${t.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${g.current?.offsetTop}px`},handleRemoveFloatingThread:W})]})]})})},ii=e=>({[Jt]:{recipientEmailList:e.recipientEmailList??[],subject:e.subject??""}}),sj=e=>`${e}_form`,rj=e=>ae.createElement("svg",{width:98,height:121,viewBox:"0 0 98 121",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ae.createElement("path",{d:"M49.2796 0.921875C32.9744 0.921875 19.7096 14.1944 19.7096 30.5087C19.7125 35.7639 21.1132 40.9238 23.7681 45.459C26.423 49.9943 30.2365 53.7418 34.8175 56.317C34.4083 56.561 33.9588 56.7299 33.4901 56.8156C26.6518 57.6437 22.4965 58.8342 19.5952 60.7958C16.8429 62.6568 15.2375 65.1511 14.0552 69.4056C14.0509 69.4209 14.0466 69.4363 14.0431 69.4518L10.0918 85.7362C9.51826 88.1132 9.82738 90.6176 10.9617 92.7837C12.0961 94.9499 13.9785 96.6304 16.2589 97.5129L20.1569 99.0144H10.7796C7.99797 99.0144 5.33033 100.119 3.36345 102.086C1.39658 104.053 0.291567 106.721 0.291504 109.502V110.435C0.291815 113.216 1.39693 115.884 3.36378 117.85C5.33063 119.817 7.99813 120.922 10.7796 120.922H53.2747C53.6551 120.922 54.0199 120.771 54.2889 120.502C54.5579 120.233 54.709 119.868 54.709 119.488C54.709 119.107 54.5579 118.742 54.2889 118.473C54.0199 118.204 53.6551 118.053 53.2747 118.053H34.0289C38.6739 116.234 43.0832 113.862 47.1618 110.989C59.9371 101.998 69.4844 101.883 69.5755 101.883H86.6115C88.6324 101.883 90.5704 102.686 91.9994 104.115C93.4283 105.544 94.2311 107.482 94.2311 109.502V110.435C94.2308 112.455 93.4279 114.393 91.999 115.822C90.5701 117.251 88.6322 118.053 86.6115 118.053H62.8365C62.4561 118.053 62.0913 118.204 61.8223 118.473C61.5533 118.742 61.4022 119.107 61.4022 119.488C61.4022 119.868 61.5533 120.233 61.8223 120.502C62.0913 120.771 62.4561 120.922 62.8365 120.922H86.6115C89.3932 120.922 92.0609 119.817 94.0278 117.85C95.9947 115.883 97.0996 113.215 97.0996 110.433V109.501C97.0996 106.72 95.9947 104.052 94.0278 102.085C92.0609 100.118 89.3932 99.013 86.6115 99.013H77.2552L81.1289 97.5124C83.4101 96.6305 85.2933 94.95 86.4283 92.7836C87.5633 90.6172 87.8728 88.1123 87.2993 85.7348L83.3471 69.4504C83.3435 69.4349 83.3393 69.42 83.335 69.4047C81.0779 61.2834 76.7211 58.4595 63.9108 56.8156C63.6617 56.7812 63.4178 56.7159 63.1848 56.6214C67.9202 54.1003 71.88 50.3378 74.6396 45.7373C77.3993 41.1368 78.8546 35.872 78.8496 30.5073C78.8496 14.1942 65.5848 0.921875 49.2796 0.921875ZM50.0808 3.84176C56.084 4.02211 61.8511 6.22111 66.4504 10.0835C71.0497 13.9459 74.2125 19.2461 75.4278 25.1278C76.6431 31.0094 75.84 37.1291 73.1483 42.498C70.4565 47.867 66.0332 52.1716 60.5931 54.7165C59.1024 53.1795 57.8049 51.1354 57.3184 49.7456C58.4778 48.8954 59.4906 47.8615 60.3167 46.6848C60.9625 46.9809 61.6621 47.1419 62.3724 47.1577C62.8095 47.1603 63.2432 47.0811 63.6512 46.9243C64.5464 46.5762 65.7044 45.6681 66.1373 43.3181C66.2624 42.9869 66.4272 42.6721 66.628 42.3806L66.7279 42.2148C68.7825 38.8099 69.2671 36.263 68.2103 34.43C67.7877 33.7064 67.1417 33.1394 66.3694 32.8142C66.4922 32.3725 66.5552 31.9163 66.5566 31.4579V29.7934C66.5566 24.4319 64.183 20.499 58.861 17.0401C58.612 16.8783 58.3989 16.667 58.235 16.4194C58.071 16.1718 57.9598 15.8931 57.9081 15.6007C57.125 11.0899 54.1033 8.50358 49.6158 8.50358H49.613C42.7338 8.50525 41.4374 13.4875 41.1983 15.6301C41.1628 15.9531 41.0576 16.2647 40.8901 16.5432C40.7227 16.8217 40.4968 17.0607 40.2282 17.2436C36.7881 19.5877 32.8393 23.1325 32.8393 29.7934V31.4579C32.8389 31.9742 32.9165 32.4876 33.0695 32.9808C32.4212 33.2864 31.8789 33.7785 31.5119 34.3941C30.4489 36.1843 30.9504 38.7427 33.0456 42.2153L33.133 42.36C33.3398 42.6607 33.5094 42.9854 33.6381 43.3269C33.9878 45.1621 34.9709 46.0635 35.7344 46.4966C36.4514 46.8873 37.2576 47.0851 38.074 47.0704C38.4264 47.0695 38.7782 47.0401 39.1259 46.9826C39.7172 47.7756 40.3958 48.4996 41.1489 49.141C40.3987 51.1167 38.8989 53.0103 37.368 54.4238C32.9251 52.2043 29.188 48.7913 26.5758 44.5673C23.9635 40.3432 22.5793 35.4752 22.5781 30.5087C22.5811 26.9366 23.3008 23.4015 24.6945 20.1126C26.0883 16.8237 28.1278 13.8479 30.6922 11.3613C33.2567 8.87477 36.294 6.92806 39.6244 5.63643C42.9547 4.34481 46.5104 3.73454 50.0808 3.84176V3.84176ZM49.6125 11.3716H49.6148C52.6985 11.3716 54.5375 12.9592 55.0811 16.0909C55.2008 16.7719 55.4592 17.4211 55.8404 17.998C56.2216 18.575 56.7174 19.0673 57.2969 19.4445C61.7759 22.3556 63.6871 25.4502 63.6871 29.793V31.4574C63.6872 31.8279 63.5967 32.1929 63.4235 32.5204C63.2502 32.8479 62.9995 33.1281 62.6931 33.3366V30.1506C62.6908 29.0631 62.4335 27.9912 61.9419 27.0212C61.4503 26.0511 60.7381 25.2098 59.8624 24.5648C57.1677 22.6285 53.7984 24.3061 53.6562 24.3785C53.605 24.4045 53.5554 24.4335 53.5077 24.4654C51.1056 26.0768 48.8478 26.0308 45.9671 24.3085C44.5197 23.32 41.5837 23.1611 39.9541 24.4266C38.9025 25.1029 38.0381 26.0333 37.4408 27.1317C36.8435 28.2302 36.5325 29.4614 36.5365 30.7118V33.2124C36.2772 32.9993 36.0684 32.7314 35.925 32.428C35.7816 32.1245 35.7073 31.793 35.7073 31.4574V29.793C35.7073 25.5322 37.4846 22.5834 41.8426 19.614C42.4535 19.1982 42.9671 18.6551 43.348 18.0219C43.7289 17.3888 43.9681 16.6806 44.0491 15.9462C44.3864 12.9103 46.258 11.3724 49.6125 11.3716ZM42.9781 26.3894C43.5413 26.3894 44.1076 26.5022 44.3521 26.6774C44.3832 26.6999 44.4156 26.7216 44.4478 26.7414C48.2475 29.0291 51.7046 29.0839 55.0125 26.9086C55.356 26.7553 57.0461 26.072 58.1756 26.8833C58.6864 27.2611 59.1017 27.7533 59.3881 28.3204C59.6746 28.8875 59.8242 29.5138 59.8251 30.1492V39.1638C59.8346 40.5106 59.5775 41.846 59.0687 43.0931C58.5599 44.3401 57.8093 45.4742 56.8603 46.4299C55.9113 47.3856 54.7826 48.1442 53.5392 48.6618C52.2957 49.1794 50.9622 49.4459 49.6153 49.4459C48.2684 49.4459 46.9349 49.1794 45.6914 48.6618C44.448 48.1442 43.3193 47.3856 42.3703 46.4299C41.4213 45.4742 40.6707 44.3401 40.1619 43.0931C39.6531 41.846 39.396 40.5106 39.4055 39.1638L39.4051 30.7118C39.4026 29.9319 39.5988 29.1642 39.9752 28.4812C40.3516 27.7981 40.8958 27.2222 41.5564 26.8077C41.6082 26.7751 41.6578 26.7393 41.7049 26.7003C41.9698 26.4814 42.4723 26.3894 42.9781 26.3894ZM64.8091 35.3101C64.9906 35.3368 65.165 35.3995 65.322 35.4944C65.4791 35.5893 65.6156 35.7146 65.7237 35.8629C65.8941 36.1581 66.2926 37.3823 64.2707 40.7329L64.1755 40.8922C63.8002 41.5108 63.4455 42.0954 63.316 42.798C63.1702 43.5909 62.9076 44.1338 62.6138 44.2495C62.3092 44.316 61.9912 44.2814 61.708 44.151C62.3602 42.5697 62.6953 40.8757 62.6941 39.1652V36.4316C63.4779 36.2303 64.2027 35.8459 64.8091 35.3101V35.3101ZM34.7204 35.4301C35.2551 35.8691 35.8732 36.1952 36.5375 36.3886V39.1652C36.536 40.8714 36.8691 42.5613 37.5179 44.1393C37.3892 44.1108 37.2652 44.0643 37.1495 44.0011C37.0209 43.9282 36.63 43.7063 36.4562 42.7896C36.3224 42.087 35.9653 41.4972 35.5869 40.873L35.5019 40.7329C33.8673 38.0236 33.6415 36.4418 33.9752 35.8652C34.0639 35.7464 34.1755 35.6466 34.3035 35.5719C34.4315 35.4971 34.5733 35.4489 34.7204 35.4301ZM43.572 50.7798C45.2964 51.6836 47.2015 52.1892 49.1472 52.2594C51.0929 52.3295 53.0295 51.9624 54.8145 51.185C55.503 52.7783 56.4174 54.2641 57.5294 55.5966C55.8184 62.7256 51.9726 67.8702 46.0773 70.8823C43.7618 72.0558 41.27 72.8428 38.7005 73.2121V57.0594C40.6315 55.4367 42.498 53.2058 43.572 50.7798ZM59.8769 57.9292C60.5403 58.4659 61.2737 58.9097 62.0568 59.2486C59.9126 69.1211 55.1295 77.1108 47.8239 83.0068C45.0554 85.2523 41.984 87.0961 38.7005 88.4838V84.0797C41.0671 83.8122 45.8154 82.543 51.2503 77.062C51.383 76.9283 51.4881 76.7698 51.5595 76.5954C51.6309 76.4211 51.6673 76.2344 51.6666 76.0461C51.6658 75.8577 51.628 75.6713 51.5552 75.4975C51.4824 75.3238 51.3761 75.1661 51.2424 75.0334C50.9723 74.7656 50.6069 74.616 50.2266 74.6176C49.8462 74.6192 49.4821 74.7718 49.2143 75.0418C44.594 79.7008 40.6461 80.8889 38.7005 81.1832V76.1086C41.683 75.7301 44.5792 74.8464 47.265 73.4955C51.6634 71.2764 57.241 66.7984 59.8769 57.9292ZM35.8339 58.9941V91.0545L33.4518 89.7005V80.5235C33.4518 80.1431 33.3007 79.7783 33.0317 79.5093C32.7628 79.2403 32.398 79.0892 32.0176 79.0892C31.6372 79.0892 31.2724 79.2403 31.0034 79.5093C30.7344 79.7783 30.5833 80.1431 30.5833 80.5235V88.0716L27.1783 86.1354L26.7446 60.8925C27.4993 60.7008 28.3155 60.524 29.199 60.3588L29.1995 60.3593V69.4906C29.1995 69.871 29.3506 70.2358 29.6196 70.5047C29.8885 70.7737 30.2533 70.9248 30.6337 70.9248C31.0141 70.9248 31.3789 70.7737 31.6479 70.5047C31.9169 70.2358 32.068 69.871 32.068 69.4906V59.8938C32.635 59.8141 33.2247 59.7373 33.837 59.6632C34.5352 59.5528 35.2101 59.3267 35.8339 58.9941V58.9941ZM64.8642 59.841C66.498 60.0748 67.9475 60.3316 69.2384 60.6147C69.0142 63.3677 67.9385 70.5555 62.8514 75.4279C62.7154 75.5582 62.6063 75.714 62.5305 75.8864C62.4546 76.0589 62.4135 76.2446 62.4094 76.4329C62.4054 76.6212 62.4384 76.8085 62.5067 76.9841C62.575 77.1596 62.6772 77.32 62.8075 77.4561C62.9378 77.5921 63.0936 77.7012 63.2661 77.777C63.4385 77.8528 63.6242 77.894 63.8125 77.898C64.0008 77.9021 64.1881 77.8691 64.3637 77.8008C64.5392 77.7324 64.6996 77.6302 64.8357 77.4999C70.3593 72.2111 71.7222 64.7855 72.0583 61.3505C73.3289 61.7263 74.5513 62.2488 75.701 62.9075C75.6503 65.9403 74.7925 77.8281 64.76 84.4532C64.5999 84.5557 64.4618 84.689 64.3537 84.8453C64.2455 85.0016 64.1696 85.1779 64.1301 85.3639C64.0907 85.5498 64.0887 85.7418 64.1241 85.9285C64.1595 86.1153 64.2317 86.2931 64.3365 86.4517C64.4413 86.6103 64.5765 86.7465 64.7344 86.8524C64.8923 86.9583 65.0696 87.0317 65.2561 87.0685C65.4426 87.1052 65.6346 87.1045 65.8208 87.0664C66.007 87.0283 66.1838 86.9535 66.3409 86.8465C71.6878 83.3153 75.4975 77.9065 77.3575 71.2059C77.8907 69.2799 78.2534 67.3108 78.4416 65.3213C79.4455 66.6635 80.0371 68.2544 80.5654 70.1498L84.512 86.4113C84.9225 88.1121 84.7011 89.904 83.8891 91.4537C83.077 93.0034 81.7296 94.2053 80.0976 94.8358L69.314 99.013H62.5825C62.5992 98.5058 62.4787 98.0035 62.2337 97.5591C61.7499 96.6821 61.1164 95.8965 60.362 95.2377L62.8458 93.7904C65.7686 95.2672 69.0004 96.0285 72.275 96.0114C72.6684 96.0114 73.0714 96.0007 73.4819 95.9777C73.6716 95.9697 73.8579 95.924 74.0299 95.8434C74.2018 95.7628 74.3561 95.6488 74.4837 95.5081C74.6112 95.3674 74.7096 95.2027 74.773 95.0237C74.8364 94.8446 74.8636 94.6548 74.8531 94.4652C74.8426 94.2755 74.7945 94.0899 74.7116 93.919C74.6287 93.7481 74.5127 93.5953 74.3703 93.4696C74.228 93.3439 74.062 93.2477 73.8822 93.1867C73.7023 93.1256 73.5121 93.1009 73.3227 93.1139C70.8018 93.2547 68.2788 92.8773 65.9095 92.005L74.692 86.8875C75.0183 86.6948 75.2549 86.3808 75.3504 86.0141C75.4459 85.6474 75.3924 85.2578 75.2015 84.9304C75.0107 84.6031 74.6981 84.3645 74.332 84.2669C73.9659 84.1693 73.576 84.2205 73.2475 84.4093L57.5066 93.5817C56.1863 93.1236 54.7739 92.9966 53.3931 93.2117C52.0124 93.4269 50.7055 93.9776 49.5873 94.8157L48.6643 95.5001C48.5304 95.4205 48.3911 95.3438 48.2422 95.2723C47.9751 95.1448 47.7037 95.0231 47.428 94.9067C56.5064 90.843 59.3085 85.1014 59.4385 84.8249C59.595 84.4822 59.6103 84.0917 59.4813 83.7378C59.3522 83.3838 59.0891 83.0949 58.7488 82.9334C58.4084 82.7719 58.0182 82.7507 57.6624 82.8745C57.3066 82.9984 57.0138 83.2572 56.8473 83.5951C56.8392 83.6116 56.0169 85.2804 53.8191 87.3596C51.8123 89.2583 48.215 91.8914 42.4529 93.732C41.8642 93.7075 41.2745 93.7357 40.6908 93.8161L38.7005 92.6844V91.5671C42.6145 90.0729 46.2659 87.9655 49.5177 85.324C54.9887 80.9385 62.0006 72.9935 64.8642 59.841ZM23.8891 61.7828L24.2795 84.4873L24.2048 84.4481C23.8664 84.265 23.4693 84.2235 23.1004 84.3327C22.7315 84.4419 22.4209 84.6929 22.2367 85.0306C22.0525 85.3684 22.0098 85.7654 22.1178 86.1347C22.2258 86.5039 22.4758 86.8153 22.813 87.0005L31.3032 91.7814C31.3173 91.7895 31.3311 91.7978 31.3457 91.8052L37.2705 95.1733C36.4189 95.8053 35.7066 96.6058 35.1779 97.525C35.1707 97.5369 35.1643 97.549 35.1574 97.5614C34.9113 98.0057 34.7871 98.5071 34.7974 99.0148H28.1392L17.2893 94.8353C15.6584 94.2042 14.3121 93.0023 13.501 91.453C12.6898 89.9038 12.469 88.1126 12.8796 86.4127L16.8257 70.1512C17.9834 65.9983 19.5804 63.4623 23.8891 61.7828ZM54.4854 95.989C55.5433 95.9455 56.5925 96.1967 57.5161 96.7145C58.4397 97.2322 59.2014 97.9963 59.7163 98.9214C59.7134 98.952 59.6656 99.0144 59.6379 99.0144H50.5122C50.5835 98.5926 50.5633 98.1605 50.4529 97.7472L51.3003 97.1193C52.2238 96.4302 53.334 96.0362 54.4854 95.989ZM41.9412 96.5926C42.1716 96.5887 42.4018 96.5962 42.6307 96.6127H42.6457H42.6471C44.1604 96.7679 45.6344 97.1896 47.0008 97.8584C47.1767 97.9369 47.3382 98.0442 47.4788 98.1758C47.5934 98.2908 47.721 98.4521 47.6763 98.5689C47.5938 98.7032 47.4786 98.8144 47.3414 98.892C47.2042 98.9697 47.0496 99.0113 46.892 99.013H37.6776V98.9705L37.6706 98.9439C38.7185 97.1942 40.3283 96.6203 41.9412 96.5926ZM10.7796 101.883H57.7358C53.4157 103.661 49.3139 105.93 45.5109 108.643C34.377 116.48 24.2433 117.936 23.334 118.053H10.7796C9.7789 118.053 8.78805 117.856 7.86358 117.473C6.93911 117.09 6.09912 116.529 5.39157 115.821C4.68403 115.114 4.12279 114.274 3.7399 113.349C3.35701 112.425 3.15997 111.434 3.16003 110.433V109.502C3.16003 107.482 3.9628 105.544 5.39174 104.115C6.82067 102.686 8.75873 101.883 10.7796 101.883V101.883ZM9.70899 105.504C9.3286 105.504 8.96379 105.655 8.69481 105.924C8.42584 106.193 8.27473 106.557 8.27473 106.938C8.27473 107.318 8.42584 107.683 8.69481 107.952C8.96379 108.221 9.3286 108.372 9.70899 108.372H10.3542C10.7346 108.372 11.0994 108.221 11.3684 107.952C11.6374 107.683 11.7885 107.318 11.7885 106.938C11.7885 106.557 11.6374 106.193 11.3684 105.924C11.0994 105.655 10.7346 105.504 10.3542 105.504H9.70899ZM14.982 105.504C14.6016 105.504 14.2368 105.655 13.9678 105.924C13.6988 106.193 13.5477 106.557 13.5477 106.938C13.5477 107.318 13.6988 107.683 13.9678 107.952C14.2368 108.221 14.6016 108.372 14.982 108.372H33.3192C33.6996 108.372 34.0644 108.221 34.3334 107.952C34.6024 107.683 34.7535 107.318 34.7535 106.938C34.7535 106.557 34.6024 106.193 34.3334 105.924C34.0644 105.655 33.6996 105.504 33.3192 105.504H14.982Z",fill:"#D4D8DD"})),ij=s.div`
|
|
4541
4544
|
justify-content: center;
|
|
4542
4545
|
align-items: center;
|
|
4543
4546
|
display: flex;
|
|
@@ -4589,17 +4592,17 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4589
4592
|
align-items: center;
|
|
4590
4593
|
gap: 5px;
|
|
4591
4594
|
box-sizing: border-box;
|
|
4592
|
-
${e=>e.companyNameSticky?
|
|
4595
|
+
${e=>e.companyNameSticky?ve.css`
|
|
4593
4596
|
position: sticky;
|
|
4594
4597
|
z-index: 1;
|
|
4595
|
-
`:
|
|
4598
|
+
`:ve.css`
|
|
4596
4599
|
position: static;
|
|
4597
4600
|
z-index: 0;
|
|
4598
4601
|
`};
|
|
4599
|
-
${e=>e.actualDataValue==="companyName"?
|
|
4602
|
+
${e=>e.actualDataValue==="companyName"?ve.css`
|
|
4600
4603
|
padding-left: ${t.Space.sp4};
|
|
4601
4604
|
flex: 1 1 auto;
|
|
4602
|
-
`:
|
|
4605
|
+
`:ve.css`
|
|
4603
4606
|
padding-left: ${t.Space.sp0};
|
|
4604
4607
|
`};
|
|
4605
4608
|
`,gj=s(t.StandardRegular)`
|
|
@@ -4688,7 +4691,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4688
4691
|
`,zj=s.div`
|
|
4689
4692
|
display: flex;
|
|
4690
4693
|
align-items: center;
|
|
4691
|
-
`,{dateFormat:ci}=t.appLocale.getLocalizedStrings(),Fj=({companyView:e,companyNameSticky:n,isReviewVendorColumnVisible:r,totalHeight:i,analytics:a,addThreadRequestThreadId:d,setNoteData:l,setElementRef:c,setAddThreadRequestThreadId:p,onTransactionTagClicked:m,onClickAuditScore:x,onClickWarningsCount:g,onCompanyNameClicked:h,onUncategorizedAccountsErrorClick:C,onReviewVendorTagClicked:b})=>{const S=t.useWindowSizeContext(),{name:y,companyId:j}=e,f=`cockpit_${j}`,E="audit.notes",{threads:$,isLoading:A}=t.useFilteredThreads({entityType:E,companyId:j},!1),{openThread:I,threads:
|
|
4694
|
+
`,{dateFormat:ci}=t.appLocale.getLocalizedStrings(),Fj=({companyView:e,companyNameSticky:n,isReviewVendorColumnVisible:r,totalHeight:i,analytics:a,addThreadRequestThreadId:d,setNoteData:l,setElementRef:c,setAddThreadRequestThreadId:p,onTransactionTagClicked:m,onClickAuditScore:x,onClickWarningsCount:g,onCompanyNameClicked:h,onUncategorizedAccountsErrorClick:C,onReviewVendorTagClicked:b})=>{const S=t.useWindowSizeContext(),{name:y,companyId:j}=e,f=`cockpit_${j}`,E="audit.notes",{threads:$,isLoading:A}=t.useFilteredThreads({entityType:E,companyId:j},!1),{openThread:I,threads:w,addThread:k,removeThread:N,setOpenThread:D,setRequestToOpenThread:G}=u.useContext(t.ThreadsContext),O=u.useRef(null),Z=I!==null?w.get(I):null,q=I?.includes(j)===!0,R=I!=null&&w.get(I)==null&&q,T=d!=null&&w.get(d)?.metadata.companyId===j,V=u.useCallback(()=>{I?.includes(t.NEW_THREAD_SUFFIX)===!0&&N(I),d!=null&&p(void 0)},[d,I,N,p]),W=_=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:_.isElementThreadOpen??!1,isElementThreadPresent:_.isElementThreadPresent??!1,itemKey:_.itemKey,elementThreadId:_.elementThreadId??"",roomId:f,addThreadRequestThreadId:d,openThreadId:I,threadStyle:_.threadStyle,openThreadMetadata:Z?.metadata??null,onElementClick:L,onAddThreadClick:J}),v=u.useCallback(_=>{if(_===I)D(null);else if(w.has(_))D(_);else if(_.includes(t.NEW_THREAD_SUFFIX)){const[oe,ne]=_.replace(t.NEW_THREAD_SUFFIX,"").split("."),Y=_t(Rt(oe),ee.toReviewColumnKeyType(ne),j,y);k(_,{type:"thread",visibility:"public",id:_,roomId:f,createdAt:new Date,updatedAt:new Date,comments:[],metadata:Y,resolved:!1}),D(_)}},[j,y,I,w,k,D,f]),L=u.useCallback((_,oe,ne=!1)=>{const Y=bt.find(le=>le.key===oe);if(G(null),Y!=null&&(_.type==="contextmenu"||ne===!0)){if(Y.isThreadAllowed===!1)return;V(),_.preventDefault(),_.stopPropagation();const le=t.toCollaborationEntityType({tab:"audit",key:Y.key}),ce=[...t.getFilteredThreads(w,{entityType:le,companyId:j},"both")],fe=ce.length>0&&ce[0].length>0?ce[0][0]:Pe("audit",Y.key,j);w.has(fe)?v(fe):d===fe?p(void 0):(p(fe),D(null))}},[w,j,d,v,p,D,G,V]),J=u.useCallback((_,oe)=>{_.stopPropagation();const ne=Pe("audit",oe,j);p(void 0),v(ne)},[j,p,v]),re=()=>{h(e)},F=u.useCallback(()=>{C(e.primaryEmailDomain)},[C,e.primaryEmailDomain]),K=()=>{if(e.auditSummary.auditReportLastGeneratedDate==null){const _=ee.dateNow().startOf("month").subtract(1,"date").format(ci.analytics.MMMYYYYFormat),oe=e.controllers?.map(ne=>`${ne.user.firstName} ${ne.user.middleName} ${ne.user.lastName}`)??[];a.trackGetAuditScore(!0,e.name,_,oe,ee.dateNow().format(ci.analytics.MMSlashDDSlashYYYYFormat))}x(e.companyId)},H=e.onboardingInfo?.uncategorizedExpenseAccountIdentified===!0&&e.onboardingInfo?.uncategorizedIncomeAccountIdentified===!0;return o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{G(null),d!=null&&(p(void 0),d.includes(t.NEW_THREAD_SUFFIX)&&N(d))},children:o.jsxRuntimeExports.jsx(Uj,{windowSize:S,isThreadOpen:q||T,totalHeight:i,isCreationInProgress:R,children:bt.map((_,oe)=>{const ne=t.toCollaborationEntityType({tab:"audit",key:_.key}),Y=bt.length-2<=oe,le=[...t.getFilteredThreads(w,{entityType:ne,companyId:j},"both")],ce=le.length>0&&le[0].length>0?le[0][0]:Pe("audit",_.key,j),fe=w.get(ce),we=fe!=null&&fe.resolved===!1,B=ce===I,Se=d===ce;switch(_.key){case"companyName":return o.jsxRuntimeExports.jsxs(Wj,{companyNameSticky:n,columnWidth:_.width,windowSize:S,isThreadOpen:B||Se,isThreadAllowed:_.isThreadAllowed,className:te,onContextMenu:ie=>L(ie,_.key),ref:ie=>{c(j,_.key,ie)},children:[o.jsxRuntimeExports.jsxs(Vj,{ref:O,children:[o.jsxRuntimeExports.jsx(_j,{onClick:ie=>{ie.preventDefault(),re()},children:y}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{anchorRef:O,isElementThreadOpen:B,roomId:f,openThreadId:I,openThreadMetadata:Z?.metadata??null})]}),o.jsxRuntimeExports.jsxs(Hj,{className:"notesIcon",onClick:ie=>{ie.preventDefault(),l({roomId:f,companyId:j,companyName:y,entityType:E})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:$.length,isLoading:A}),o.jsxRuntimeExports.jsx(Kj,{})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:we,itemKey:_.key,style:{left:t.Space.sp4},onElementClick:L}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Pe("audit",_.key,j),addThreadRequestThreadId:d,itemKey:_.key,onAddThreadClick:J})]},ce);case"auditScore":return o.jsxRuntimeExports.jsxs(Co,{ref:ie=>{c(j,_.key,ie)},columnWidth:_.width,windowSize:S,isThreadAllowed:_.isThreadAllowed,className:te,onContextMenu:ie=>L(ie,_.key),children:[o.jsxRuntimeExports.jsx(bj,{auditSummary:e.auditSummary,onClickScore:K}),W({isElementThreadOpen:B,isElementThreadPresent:we,itemKey:_.key,elementThreadId:ce,threadStyle:Y?{right:t.Space.sp0}:void 0})]},ce);case"uncategorized":return o.jsxRuntimeExports.jsxs(Co,{ref:ie=>{c(j,_.key,ie)},columnWidth:_.width,windowSize:S,isThreadAllowed:_.isThreadAllowed,className:te,onContextMenu:ie=>L(ie,_.key),children:[H===!0?o.jsxRuntimeExports.jsx(li,{onTransactionTagClicked:ie=>m(e,ie,"uncategorized"),...e.uncategorizedTransactions}):o.jsxRuntimeExports.jsxs(Yj,{onClick:F,children:[o.jsxRuntimeExports.jsx(t.SvgHighImportance,{className:"alert-icon",width:t.sp[3],height:t.sp[3]}),o.jsxRuntimeExports.jsx(Gj,{children:t.appLocale.getLocalizedStrings().cockpit.review.selectUncategorizedAccounts})]}),W({isElementThreadOpen:B,isElementThreadPresent:we,itemKey:_.key,elementThreadId:ce,threadStyle:Y?{right:t.Space.sp0}:void 0})]},ce);case"miscategorized":return o.jsxRuntimeExports.jsxs(Co,{ref:ie=>{c(j,_.key,ie)},columnWidth:_.width,windowSize:S,isThreadAllowed:_.isThreadAllowed,className:te,onContextMenu:ie=>L(ie,_.key),children:[o.jsxRuntimeExports.jsx(li,{onTransactionTagClicked:ie=>m(e,ie,"miscategorized"),...e.miscategorizedTransactions}),W({isElementThreadOpen:B,isElementThreadPresent:we,itemKey:_.key,elementThreadId:ce,threadStyle:Y?{right:t.Space.sp0}:void 0})]},ce);case"reviewVendor":return r?o.jsxRuntimeExports.jsxs(Co,{ref:ie=>{c(j,_.key,ie)},columnWidth:_.width,windowSize:S,isThreadAllowed:_.isThreadAllowed,className:te,onContextMenu:ie=>L(ie,_.key),children:[o.jsxRuntimeExports.jsx(Bj,{widthSize:_.width,windowSize:S,children:o.jsxRuntimeExports.jsx(wj,{onReviewVendorTagClicked:()=>b(e),isReviewComplete:!e.isVendorReviewReqiured})}),W({isElementThreadOpen:B,isElementThreadPresent:we,itemKey:_.key,elementThreadId:ce,threadStyle:Y?{right:t.Space.sp0}:void 0})]},ce):null;case"warnings":return o.jsxRuntimeExports.jsxs(Co,{ref:ie=>{c(j,_.key,ie)},columnWidth:_.width,windowSize:S,isThreadAllowed:_.isThreadAllowed,className:te,onContextMenu:ie=>L(ie,_.key),children:[o.jsxRuntimeExports.jsx(Aj,{companyId:e.companyId,warningsCount:ee.getAuditWarningsCount(e),onClick:g}),W({isElementThreadOpen:B,isElementThreadPresent:we,itemKey:_.key,elementThreadId:ce,threadStyle:Y?{right:t.Space.sp0}:void 0})]},ce);default:return null}})})})},Bj=s.div`
|
|
4692
4695
|
display: flex;
|
|
4693
4696
|
align-items: flex-start;
|
|
4694
4697
|
width: ${e=>e.widthSize.valuePx(e.windowSize)};
|
|
@@ -4713,7 +4716,9 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4713
4716
|
`,_j=s(t.StandardMediumSp)`
|
|
4714
4717
|
word-break: break-word;
|
|
4715
4718
|
cursor: pointer;
|
|
4716
|
-
`,Vj=s.div
|
|
4719
|
+
`,Vj=s.div`
|
|
4720
|
+
position: relative;
|
|
4721
|
+
`,Uj=s.div`
|
|
4717
4722
|
display: flex;
|
|
4718
4723
|
flex-direction: row;
|
|
4719
4724
|
align-items: center;
|
|
@@ -4747,7 +4752,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4747
4752
|
}
|
|
4748
4753
|
}
|
|
4749
4754
|
|
|
4750
|
-
${e=>e.isThreadOpen?
|
|
4755
|
+
${e=>e.isThreadOpen?ve.css`
|
|
4751
4756
|
box-shadow: ${t.Space.sp0} 2px ${t.Space.sp2}
|
|
4752
4757
|
${e.theme.colors.dropShadowHover};
|
|
4753
4758
|
border: 1px solid ${e.theme.colors.primary};
|
|
@@ -4767,7 +4772,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4767
4772
|
border-color: ${e=>e.theme.colors.primary};
|
|
4768
4773
|
}
|
|
4769
4774
|
}
|
|
4770
|
-
${e=>e.isCreationInProgress?
|
|
4775
|
+
${e=>e.isCreationInProgress?ve.css`
|
|
4771
4776
|
border: 1px solid ${e.theme.colors.primary};
|
|
4772
4777
|
animation: animate 3s linear infinite;
|
|
4773
4778
|
`:null};
|
|
@@ -4814,7 +4819,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4814
4819
|
svg {
|
|
4815
4820
|
color: ${t.Colors.important};
|
|
4816
4821
|
}
|
|
4817
|
-
`,{common:{headers:{comments:Zj}},collaboration:{threads:{placeholder:{addANewComment:Xj,replyAComment:qj},tooltip:{resolveComment:Qj,unResolveComment:Jj}}}}=t.appLocale.getLocalizedStrings(),e4=({reviewView:e,allUsers:n,isReviewVendorColumnVisible:r,analytics:i,onColumnSortConfigChanged:a,onClickAuditScore:d,onClickWarningsCount:l,onTransactionTagClicked:c,onCompanyNameClicked:p,onRetryBankAccountConnection:m,onUncategorizedAccountsErrorClick:x,onReviewVendorTagClicked:g,initialOpenThreadRequest:h})=>{const C=t.useWindowSizeContext(),b=u.useRef(null),[S,y]=u.useState(null),[j,f]=u.useState(null),{uiState:E}=e,$=!(C==="small"||C==="medium-compact"),A=R=>e.companies[R].name.length>Wt?
|
|
4822
|
+
`,{common:{headers:{comments:Zj}},collaboration:{threads:{placeholder:{addANewComment:Xj,replyAComment:qj},tooltip:{resolveComment:Qj,unResolveComment:Jj}}}}=t.appLocale.getLocalizedStrings(),e4=({reviewView:e,allUsers:n,isReviewVendorColumnVisible:r,analytics:i,onColumnSortConfigChanged:a,onClickAuditScore:d,onClickWarningsCount:l,onTransactionTagClicked:c,onCompanyNameClicked:p,onRetryBankAccountConnection:m,onUncategorizedAccountsErrorClick:x,onReviewVendorTagClicked:g,initialOpenThreadRequest:h})=>{const C=t.useWindowSizeContext(),b=u.useRef(null),[S,y]=u.useState(null),[j,f]=u.useState(null),{uiState:E}=e,$=!(C==="small"||C==="medium-compact"),A=R=>e.companies[R].name.length>Wt?Le+32:Le;u.useEffect(()=>{b.current&&b.current.resetAfterIndex(0)},[e]);const{setOpenThread:I,setRequestToOpenThread:w,requestToOpenThread:k,isLoading:N}=u.useContext(t.ThreadsContext);u.useEffect(()=>{h!=null&&e.fetchState==="Completed"&&N===!1&&w(h)},[h,e.fetchState,N,w]);const[D,G]=u.useState(void 0),O=u.useRef([]),Z=u.useMemo(()=>({makeCompanyNameSticky:$,uiState:E,isReviewVendorColumnVisible:r,onColumnSortConfigChanged:a}),[$,E,r,a]),q=u.useCallback((R,T,V)=>{const W=e.companies.findIndex(L=>L.companyId===R),v=bt.findIndex(L=>L.key===T);W!==-1&&v!==-1&&(O.current[W]==null?O.current[W]=[V]:O.current[W][v]=V)},[e.companies]);return u.useEffect(()=>{if(k!=null&&S!=null){const{companyId:R,entityType:T}=k,[V,W]=T.split("."),v=e.companies.findIndex(F=>F.companyId===R),L=bt.findIndex(F=>F.key===W);v!==-1&&!(S.visibleStartIndex<=v&&S.visibleStopIndex>=v)&&b.current?.scrollToItem(v,"center"),setTimeout(()=>{const F=O.current[v]?.[0]?.getBoundingClientRect().bottom,K=O.current[v]?.[0]?.getBoundingClientRect().top;F!=null&&K!=null&&(window.innerHeight>=F&&window.innerHeight>=K||K<0)&&O.current[v][L]?.scrollIntoView({block:"center",behavior:"auto"})},0);const re=setInterval(()=>{const F=O.current[v]?.[L]?.getBoundingClientRect().left,K=O.current[v]?.[L]?.getBoundingClientRect().right,H=O.current[v]?.[L]?.offsetWidth;if(F!=null&&H!=null&&K!=null&&(F<window.innerWidth-H||K<window.innerWidth)){clearInterval(re);const _=k.threadId,oe=k.onThreadShownCallback;_&&(w(null),I(k.threadId),oe?.())}},500);setTimeout(()=>{clearInterval(re),w(null)},2e3)}},[k,S,I,w]),o.jsxRuntimeExports.jsx(t4,{children:o.jsxRuntimeExports.jsxs(ba.Provider,{value:Z,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:R,width:T})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:R,innerElementType:Ra,itemCount:e.companies.length,itemSize:A,onItemsRendered:V=>y(V),itemData:{reviewView:e,isReviewVendorColumnVisible:r,analytics:i,makeCompanyNameSticky:$,allUsers:n,addThreadRequestThreadId:D,setElementRef:q,setAddThreadRequestThreadId:G,setNoteData:f,onTransactionTagClicked:c,onCompanyNameClicked:p,onRetryBankAccountConnection:m,onUncategorizedAccountsErrorClick:x,onReviewVendorTagClicked:g,onClickAuditScore:d,onClickWarningsCount:l},width:T,ref:b,overscanCount:Bt,children:$a})}),j!=null?o.jsxRuntimeExports.jsx(Xe.RoomProvider,{id:j.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${j.companyName} ${Zj}`,filter:{application:"cockpit",companyId:j.companyId,entityType:j.entityType,isGlobalComment:!1,tab:"audit"},isLoading:!1,threadMetadata:{companyName:j.companyName,companyId:j.companyId,entityId:j.companyId,entityType:j.entityType,isGlobalComment:!1,application:"cockpit",tab:"audit",url:window.location.href},textOverrides:{composerPlaceholder:Xj,replyComposerPlaceholder:qj,threadResolve:Qj,threadUnResolve:Jj},onThreadClick:R=>null,onCloseAllThreadsDrawer:()=>f(null)})}):null]})})},ba=u.createContext(void 0),Ra=u.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:d,uiState:l,isReviewVendorColumnVisible:c,onColumnSortConfigChanged:p}=u.useContext(ba);return o.jsxRuntimeExports.jsxs(s4,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(dj,{companyNameSticky:d,onColumnSortConfigChanged:p,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder},isReviewVendorColumnVisible:c}),o.jsxRuntimeExports.jsx(n4,{children:r})]})});Ra.displayName="Review list view inner element type";const $a=({index:e,style:n,data:r})=>{const{reviewView:i,isReviewVendorColumnVisible:a,makeCompanyNameSticky:d,allUsers:l,analytics:c,addThreadRequestThreadId:p,setElementRef:m,setNoteData:x,onCompanyNameClicked:g,onTransactionTagClicked:h,setAddThreadRequestThreadId:C,onUncategorizedAccountsErrorClick:b,onReviewVendorTagClicked:S,onClickAuditScore:y,onClickWarningsCount:j}=r,f=i.companies[e],{companyId:E}=f;return o.jsxRuntimeExports.jsx(o4,{style:{...n,width:"fit-content",minWidth:"100%"},children:o.jsxRuntimeExports.jsx(Fj,{totalHeight:typeof n.height=="number"?n.height:Le,addThreadRequestThreadId:p,setNoteData:x,setElementRef:m,setAddThreadRequestThreadId:C,analytics:c,companyView:i.companies[e],isReviewVendorColumnVisible:a,companyNameSticky:d,onCompanyNameClicked:g,onTransactionTagClicked:h,allUsers:l,onUncategorizedAccountsErrorClick:b,onReviewVendorTagClicked:S,onClickWarningsCount:j,onClickAuditScore:y})},E)};$a.displayName="ListItem";const t4=s.div`
|
|
4818
4823
|
/** Subtract top so list can occupy remaining available height */
|
|
4819
4824
|
height: calc(100vh - 150px);
|
|
4820
4825
|
max-width: 99.9%;
|
|
@@ -4891,7 +4896,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4891
4896
|
`,C4=s(t.StandardRegular)`
|
|
4892
4897
|
margin-bottom: ${t.Space.sp4};
|
|
4893
4898
|
color: ${e=>e.theme.colors.hero};
|
|
4894
|
-
`,j4=({auditSummaryData:e,isAuditScoreLoadingCompleted:n,isMonthEnd:r})=>{const i=!n,a=o.useTheme(),{common:d,dateFormat:l,cockpit:c}=t.appLocale.getLocalizedStrings(),p=e,m=r?p.bypassedAuditScore:p.auditScorePercentage;let x;m<=50?x=t.Colors.important:m<=75?x=t.Colors.alert:x=t.Colors.success;const g=u.useCallback(()=>p.fixesRequired>0?`${d.strings.openingBrace}${p.fixesRequired} ${p.fixesRequired>1?d.texts.issues:d.texts.issue}${d.strings.closingBrace}`:d.strings.empty,[p.fixesRequired,d.strings,d.texts]);return o.jsxRuntimeExports.jsx(d4,{isAuditScoreLoading:i,children:o.jsxRuntimeExports.jsx(u4,{auditPercentage:m,children:o.jsxRuntimeExports.jsxs(p4,{children:[!i&&o.jsxRuntimeExports.jsx(m4,{children:o.jsxRuntimeExports.jsx(o.CircularProgressbar,{value:m,text:`${Math.ceil(m)}${d.strings.percentage}`,strokeWidth:10,styles:o.buildStyles({rotation:.5,strokeLinecap:"butt",pathColor:x,textColor:a.colors.primary,trailColor:a.colors.grey3,textSize:t.Space.sp4})})}),o.jsxRuntimeExports.jsx(x4,{children:o.jsxRuntimeExports.jsxs(h4,{children:[o.jsxRuntimeExports.jsxs(g4,{children:[o.jsxRuntimeExports.jsx(S4,{children:i?c.monthEndReport.auditScoreSectionLoadingTitle.replace("__date__",
|
|
4899
|
+
`,j4=({auditSummaryData:e,isAuditScoreLoadingCompleted:n,isMonthEnd:r})=>{const i=!n,a=o.useTheme(),{common:d,dateFormat:l,cockpit:c}=t.appLocale.getLocalizedStrings(),p=e,m=r?p.bypassedAuditScore:p.auditScorePercentage;let x;m<=50?x=t.Colors.important:m<=75?x=t.Colors.alert:x=t.Colors.success;const g=u.useCallback(()=>p.fixesRequired>0?`${d.strings.openingBrace}${p.fixesRequired} ${p.fixesRequired>1?d.texts.issues:d.texts.issue}${d.strings.closingBrace}`:d.strings.empty,[p.fixesRequired,d.strings,d.texts]);return o.jsxRuntimeExports.jsx(d4,{isAuditScoreLoading:i,children:o.jsxRuntimeExports.jsx(u4,{auditPercentage:m,children:o.jsxRuntimeExports.jsxs(p4,{children:[!i&&o.jsxRuntimeExports.jsx(m4,{children:o.jsxRuntimeExports.jsx(o.CircularProgressbar,{value:m,text:`${Math.ceil(m)}${d.strings.percentage}`,strokeWidth:10,styles:o.buildStyles({rotation:.5,strokeLinecap:"butt",pathColor:x,textColor:a.colors.primary,trailColor:a.colors.grey3,textSize:t.Space.sp4})})}),o.jsxRuntimeExports.jsx(x4,{children:o.jsxRuntimeExports.jsxs(h4,{children:[o.jsxRuntimeExports.jsxs(g4,{children:[o.jsxRuntimeExports.jsx(S4,{children:i?c.monthEndReport.auditScoreSectionLoadingTitle.replace("__date__",ee.dateNow().subtract(1,"month").format(l.visual.MMMMYYYYFormat)):c.monthEndReport.auditScoreSectionTitle}),i?null:o.jsxRuntimeExports.jsx(y4,{children:g()})]}),o.jsxRuntimeExports.jsx(f4,{children:o.jsxRuntimeExports.jsx(C4,{children:i?c.review.auditReportDrawer.subTitle:c.review.auditReportDrawer.reportGeneratedSubtitle})})]})})]})})})},b4=({open:e,anchorElement:n,children:r,onClose:i})=>{const a=o.useTheme();return o.jsxRuntimeExports.jsx(o.Popover,{transitionDuration:0,anchorEl:n,open:e,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",background:a.colors.grey5,boxSizing:"border-box",transform:"translate(0px,30px)",padding:t.Space.sp3,borderRadius:t.Space.sp2}},onClose:i,children:r})},R4=({rule:e,commentsText:n,ruleGroup:r,isControllerOrReviewer:i,triggerComponent:a,setCommentsText:d,handleReasonAuditRule:l})=>{const[c,p]=u.useState(!1),[m,x]=u.useState(n),g=u.useRef(null),{cockpit:h,common:C}=t.appLocale.getLocalizedStrings(),b=o.useTheme();u.useEffect(()=>{n!==""&&p(!0)},[n]);const S=()=>{m!==""&&e.reasonUpdateFetchState.fetchState!=="In-Progress"&&l(e.auditRuleId,r.auditRuleGroupId,m,i?"approved":"pending")};return o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{p(!1)},children:o.jsxRuntimeExports.jsxs(L4,{ref:g,children:[a!=null?o.jsxRuntimeExports.jsxs(I4,{className:"placeholder",onClick:()=>{p(!c)},children:[a," "]}):null,c?o.jsxRuntimeExports.jsxs(b4,{open:c,anchorElement:g.current,onClose:()=>p(!1),children:[o.jsxRuntimeExports.jsx(v4,{children:o.jsxRuntimeExports.jsx($4,{children:h.review.auditReportDrawer.commentTitle})}),o.jsxRuntimeExports.jsx(A4,{autoFocus:!0,onFocus:y=>{if(y.target instanceof HTMLTextAreaElement){const j=y.target.value;y.target.value="",y.target.value=j}},placeholder:h.commentPlaceholder,value:m,onChange:y=>{y.target instanceof HTMLTextAreaElement&&x(y.target.value)}}),o.jsxRuntimeExports.jsx(k4,{}),o.jsxRuntimeExports.jsx(T4,{}),o.jsxRuntimeExports.jsxs(E4,{children:[o.jsxRuntimeExports.jsx(P4,{}),o.jsxRuntimeExports.jsxs(w4,{children:[o.jsxRuntimeExports.jsx(D4,{disabled:e.reasonUpdateFetchState.fetchState==="In-Progress",size:"small",style:{whiteSpace:"nowrap",padding:`${t.Space.sp1} ${t.Space.sp3}`,borderRadius:t.Space.sp2},textStyle:{color:b.colors.primary},label:C.cancel,onClick:()=>{n!==""&&l(e.auditRuleId,r.auditRuleGroupId,n,"pending"),d(""),p(!1)}}),o.jsxRuntimeExports.jsx(O4,{disabled:m===""&&e.reasonUpdateFetchState.fetchState==="In-Progress",variant:"primary",size:"small",style:{whiteSpace:"nowrap",padding:i?`${t.Space.sp1} 14px`:`${t.Space.sp1} 22px`,borderRadius:t.Space.sp2},onClick:S,label:i?C.footer.resolve:C.send,loading:e.reasonUpdateFetchState.fetchState==="In-Progress"})]})]})]}):null]})})},$4=s(t.LargeRegular)`
|
|
4895
4900
|
color: ${e=>e.theme.colors.primary};
|
|
4896
4901
|
margin-bottom: ${t.Space.sp3};
|
|
4897
4902
|
`,E4=s.div`
|
|
@@ -4941,7 +4946,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4941
4946
|
color: ${e=>e.theme.colors.hero};
|
|
4942
4947
|
${t.textStyles.largeRegular.css};
|
|
4943
4948
|
}
|
|
4944
|
-
`,D4=s(t.Button)``,O4=s(t.Button)``,N4=({open:e,anchorElement:n,children:r,onClose:i})=>{const a=o.useTheme();return o.jsxRuntimeExports.jsx(o.Popover,{transitionDuration:0,anchorEl:n,open:e,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{style:{width:"356px",display:"flex",flexDirection:"column",background:a.colors.grey5,boxSizing:"border-box",transform:"translate(0px,10px)",borderRadius:t.Space.sp2}},onClose:i,children:r})},M4=({isControllerOrReviewer:e,allUsers:n,loggedInUser:r,rule:i,ruleGroup:a,triggerComponent:d,isDisabled:l=!1,handleReasonAuditRule:c,setCommentsText:p})=>{const[m,x]=u.useState(!1),g=u.useRef(null),{cockpit:h,common:C,dateFormat:b,timeFormat:S}=t.appLocale.getLocalizedStrings(),y=i.reason!=null&&i.reason.userId?
|
|
4949
|
+
`,D4=s(t.Button)``,O4=s(t.Button)``,N4=({open:e,anchorElement:n,children:r,onClose:i})=>{const a=o.useTheme();return o.jsxRuntimeExports.jsx(o.Popover,{transitionDuration:0,anchorEl:n,open:e,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{style:{width:"356px",display:"flex",flexDirection:"column",background:a.colors.grey5,boxSizing:"border-box",transform:"translate(0px,10px)",borderRadius:t.Space.sp2}},onClose:i,children:r})},M4=({isControllerOrReviewer:e,allUsers:n,loggedInUser:r,rule:i,ruleGroup:a,triggerComponent:d,isDisabled:l=!1,handleReasonAuditRule:c,setCommentsText:p})=>{const[m,x]=u.useState(!1),g=u.useRef(null),{cockpit:h,common:C,dateFormat:b,timeFormat:S}=t.appLocale.getLocalizedStrings(),y=i.reason!=null&&i.reason.userId?ee.getUserFromAllUsers(n,i.reason.userId):void 0,j=i.reason?.reasonUpdatedAt,f=o.useTheme();return u.useEffect(()=>{i.reasonUpdateFetchState.fetchState==="Completed"&&x(!1)},[i.reasonUpdateFetchState.fetchState]),o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{x(!1)},children:o.jsxRuntimeExports.jsxs(G4,{ref:g,children:[o.jsxRuntimeExports.jsxs(K4,{className:"placeholder",onClick:()=>{x(E=>!E)},children:[d," "]}),m&&o.jsxRuntimeExports.jsxs(N4,{open:m,anchorElement:g.current,onClose:()=>x(!1),children:[o.jsxRuntimeExports.jsxs(Y4,{children:[o.jsxRuntimeExports.jsxs(U4,{children:[o.jsxRuntimeExports.jsx(z4,{children:y?.photo!=null?o.jsxRuntimeExports.jsx(H4,{src:y.photo.href,alt:h.userProfileAltText,onError:({currentTarget:E})=>{E.onerror=null,E.src=t.AvatarSVG}}):o.jsxRuntimeExports.jsx(t.EntityAvatarWithInitials,{firstName:y?.firstName??"",lastName:y?.lastName??""})}),o.jsxRuntimeExports.jsxs(V4,{children:[o.jsxRuntimeExports.jsx(_4,{children:`${ee.getUserName(y)}`}),o.jsxRuntimeExports.jsxs(W4,{children:[o.jsxRuntimeExports.jsx(F4,{children:j!=null?ee.zeniDate(j.toISOString()).format(b.visual.MMMDFormat)+C.strings.comma:C.strings.empty}),o.jsxRuntimeExports.jsx(B4,{children:j!=null?ee.zeniDate(j.toISOString()).format(S.hhmmAFormat):C.strings.empty})]})]})]}),!e&&r.userId===i.reason?.userId?o.jsxRuntimeExports.jsx(t.MoreMenuButton,{moreIconType:"plain",options:[{label:C.edit,value:C.edit},{label:C.delete,value:C.delete}],onOptionSelection:E=>{c(i.auditRuleId,a.auditRuleGroupId,i.reason?.reasonToPass??"","rejected"),E===C.edit?p(i.reason?.reasonToPass??""):p("")},valueToIcon:E=>E===C.delete?o.jsxRuntimeExports.jsx(t.SvgDelete,{}):E===C.edit?o.jsxRuntimeExports.jsx(J4,{}):o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{}),customStyleConfig:{menuPortal:()=>({zIndex:1e4})},menuPortalTarget:document.body,menuPosition:"fixed"}):null]}),o.jsxRuntimeExports.jsx(Z4,{children:o.jsxRuntimeExports.jsx(X4,{children:i.reason?.reasonToPass})}),e?o.jsxRuntimeExports.jsx(q4,{children:o.jsxRuntimeExports.jsxs(Q4,{children:[o.jsxRuntimeExports.jsx(eb,{size:"small",style:{whiteSpace:"nowrap",padding:`${t.Space.sp1} 22px`,borderRadius:t.Space.sp2},textStyle:{color:f.colors.primary},disabled:i.reasonUpdateFetchState.fetchState==="In-Progress",onClick:()=>{i.reasonUpdateFetchState.fetchState!=="In-Progress"&&c(i.auditRuleId,a.auditRuleGroupId,i.reason?.reasonToPass??"","rejected")},label:C.footer.reject}),o.jsxRuntimeExports.jsx(tb,{variant:"primary",size:"small",style:{whiteSpace:"nowrap",padding:`${t.Space.sp1} 14px`,borderRadius:t.Space.sp2},label:C.footer.approve,disabled:i.reasonUpdateFetchState.fetchState==="In-Progress",onClick:()=>{l!==!0&&i.reasonUpdateFetchState.fetchState!=="In-Progress"&&c(i.auditRuleId,a.auditRuleGroupId,i.reason?.reasonToPass??"","approved")}})]})}):o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{})]})]})})},z4=s.div`
|
|
4945
4950
|
display: flex;
|
|
4946
4951
|
margin-right: ${t.Space.sp2};
|
|
4947
4952
|
margin-left: ${t.Space.sp2};
|
|
@@ -5113,7 +5118,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5113
5118
|
width: ${t.Space.sp4};
|
|
5114
5119
|
height: ${t.Space.sp4};
|
|
5115
5120
|
color: ${e=>e.theme.colors.grey2};
|
|
5116
|
-
`,gs={navBarHeight:new t.ResponsiveSized(62,62,62),navBarPaddingLeft:new t.ResponsiveSized(t.sp[3],t.sp[3],t.sp[8]),navBarPaddingRight:new t.ResponsiveSized(t.sp[3],t.sp[3],t.sp[8])},{cockpit:{review:jo},dateFormat:ss,timeFormat:jb,common:bb}=t.appLocale.getLocalizedStrings(),Rb=({isAuditScoreCompleted:e,auditRuleGroups:n,loggedInUser:r,isMonthEnd:i,auditReportGroupView:a,allUsers:d,reviewCompanyView:l,style:c,analytics:p,handleFetchAuditReportGroupView:m,handleGenerateAuditReport:x,handleCancelIconClick:g,handleRuleClick:h,handleReasonAuditRule:C})=>{const b=t.useWindowSizeContext(),[S,y]=u.useState(rs(n,1)),[j,f]=u.useState({id:n[0]?.auditRuleGroupId,index:0}),[E,$]=u.useState(!1),[A,I]=u.useState(1),[
|
|
5121
|
+
`,gs={navBarHeight:new t.ResponsiveSized(62,62,62),navBarPaddingLeft:new t.ResponsiveSized(t.sp[3],t.sp[3],t.sp[8]),navBarPaddingRight:new t.ResponsiveSized(t.sp[3],t.sp[3],t.sp[8])},{cockpit:{review:jo},dateFormat:ss,timeFormat:jb,common:bb}=t.appLocale.getLocalizedStrings(),Rb=({isAuditScoreCompleted:e,auditRuleGroups:n,loggedInUser:r,isMonthEnd:i,auditReportGroupView:a,allUsers:d,reviewCompanyView:l,style:c,analytics:p,handleFetchAuditReportGroupView:m,handleGenerateAuditReport:x,handleCancelIconClick:g,handleRuleClick:h,handleReasonAuditRule:C})=>{const b=t.useWindowSizeContext(),[S,y]=u.useState(rs(n,1)),[j,f]=u.useState({id:n[0]?.auditRuleGroupId,index:0}),[E,$]=u.useState(!1),[A,I]=u.useState(1),[w,k]=u.useState(!1),[N,D]=u.useState(null),G=u.useMemo(()=>l?.controllers.map(W=>`${W.user.firstName} ${W.user.middleName} ${W.user.lastName}`)??[],[l?.controllers]),O={fixesRequired:0,totalChecks:0,auditScorePercentage:0,bypassedAuditScore:0,auditReportLastGeneratedDate:null};u.useEffect(()=>{a.auditReportGroups.forEach(W=>{a.auditReportGroups.forEach(L=>{L.auditReportGroupId===j.id&&(L.fetchState==="Completed"||L.fetchState==="Error")&&f({id:n[j.index+1]?.auditRuleGroupId,index:j.index+1})});const v=W.auditReport?.auditRulesGroupReport.find(L=>L.auditRuleGroupId===W.auditReportGroupId);(W.fetchState==="Completed"&&j.id===W.auditReportGroupId&&S[W.auditReportGroupId].isActive===!0&&v?.sequence===A||W.fetchState==="Error"&&j.id===W.auditReportGroupId)&&(I(A+1),y(rs(n,A+1)))})},[a.auditReportGroups,A,n,S]),u.useEffect(()=>{if(a.auditReportGroups.filter(J=>J.fetchState==="In-Progress").length===0&&$(!0),a.auditReportGroups.filter(J=>J.fetchState==="Completed"||J.fetchState==="Error").length===n.length){k(!0);let J=0;a.auditReportGroups.forEach(_=>{J=J+Ea(_.auditReport?.auditRulesGroupReport[0]?.auditRules)});const re=$b(a),F=ee.dateNow().startOf("month").subtract(1,"date").format(ss.analytics.MMMYYYYFormat),K=l?.customerGroup,H=Math.ceil(a.auditReportGroups[0].auditReport?.auditSummary.auditScorePercentage??0);p.trackAuditScorePercentage(ee.dateNow().format(ss.analytics.MMSlashDDSlashYYYYFormat),F,H,l?.name??"",re,J,G,K??null)}const L=a.auditReportGroups.find(J=>J.fetchState==="Completed");L?.auditReport?.status?.lastRefreshSuccessTime!=null&&D(L)},[a.auditReportGroups,n.length,p,l,a,G]);const Z=()=>{y(rs(n,1)),f({id:n[0]?.auditRuleGroupId,index:0}),$(!1),I(1),k(!1),D(null)},q=()=>{Z();const W=n.map(v=>v.auditRuleGroupId);x(W)},R=()=>{g()},T=W=>{m(W)},V=(W,v,L)=>{p.trackAuditIssuesClicked(L,l?.name??"",G,ee.dateNow().format(ss.analytics.MMSlashDDSlashYYYYFormat)),h(W,v)};return o.jsxRuntimeExports.jsxs(Eb,{style:c,children:[o.jsxRuntimeExports.jsx(Tb,{windowSize:b,style:c,children:o.jsxRuntimeExports.jsx(Pb,{children:o.jsxRuntimeExports.jsxs(Ib,{windowSize:b,children:[o.jsxRuntimeExports.jsx(vb,{}),o.jsxRuntimeExports.jsxs(Lb,{children:[o.jsxRuntimeExports.jsx(Ab,{children:l?.name}),o.jsxRuntimeExports.jsx(Db,{children:w?N?.auditReport?.status?.lastRefreshSuccessTime?.utc(!0).local().format(jb.hmmADashDDMMMCommaYYYY):bb.strings.empty})]}),o.jsxRuntimeExports.jsxs(Nb,{children:[o.jsxRuntimeExports.jsxs(Ob,{isGenerateClickEnabled:E,onClick:q,children:[o.jsxRuntimeExports.jsx(zb,{}),o.jsxRuntimeExports.jsx(Mb,{children:jo.auditReportDrawer.updateScore})]}),o.jsxRuntimeExports.jsx(Fb,{onClick:R,children:o.jsxRuntimeExports.jsx(Bb,{})})]})]})})}),o.jsxRuntimeExports.jsxs(wb,{children:[o.jsxRuntimeExports.jsx(kb,{children:o.jsxRuntimeExports.jsx(j4,{auditSummaryData:l!=null?l.auditSummary:O,isAuditScoreLoadingCompleted:w&&e,isMonthEnd:i})}),o.jsxRuntimeExports.jsxs(ui,{children:[o.jsxRuntimeExports.jsx(mi,{children:jo.auditReportDrawer.Business}),o.jsxRuntimeExports.jsx(xi,{children:n.filter(W=>W.ruleType===jo.auditReportDrawer.Business.toLowerCase()).map(W=>{const v=a.auditReportGroups.find(L=>L.auditReportGroupId===W.auditRuleGroupId);return v!=null&&Object.keys(S).length>0?o.jsxRuntimeExports.jsx(di,{loggedInUser:r,isControllerOrReviewer:a.isControllerOrReviewer,allUsers:d,isMonthEnd:i,ruleGroup:W,groupIdWithActiveStatus:S,auditReportGroup:v,setGroupIdWithActiveStatus:y,onClickRetryGroupFetch:T,onClickRule:V,handleReasonAuditRule:C},W.auditRuleGroupId):null})})]}),o.jsxRuntimeExports.jsxs(ui,{children:[o.jsxRuntimeExports.jsx(mi,{children:jo.auditReportDrawer.Accounting}),o.jsxRuntimeExports.jsx(xi,{children:n.filter(W=>W.ruleType===jo.auditReportDrawer.Accounting.toLowerCase()).map(W=>{const v=a.auditReportGroups.find(L=>L.auditReportGroupId===W.auditRuleGroupId);return v!=null&&Object.keys(S).length>0?o.jsxRuntimeExports.jsx(di,{loggedInUser:r,isControllerOrReviewer:a.isControllerOrReviewer,allUsers:d,isMonthEnd:i,ruleGroup:W,groupIdWithActiveStatus:S,auditReportGroup:v,setGroupIdWithActiveStatus:y,onClickRetryGroupFetch:T,onClickRule:V,handleReasonAuditRule:C},W.auditRuleGroupId):null})})]})]})]})},rs=(e,n)=>{const r={},i={};return e.forEach(a=>{const{ruleType:d,sequence:l}=a;i[d]===void 0?i[d]={first:l,last:l}:(l<i[d].first&&(i[d].first=l),l>i[d].last&&(i[d].last=l))}),e.forEach(a=>{const{auditRuleGroupId:d,ruleType:l,sequence:c}=a,p=c<=n,m=c===i[l].first,x=c===i[l].last;r[d]={isActive:p,isGroupExpanded:!1,isFirst:m,isLast:x}}),r},$b=e=>e.auditReportGroups.filter(r=>r.auditReport?.auditRulesGroupReport[0].isSuccess===!1).map(r=>r.auditReportGroupId),Eb=s.div`
|
|
5117
5122
|
display: flex;
|
|
5118
5123
|
flex-direction: column;
|
|
5119
5124
|
align-items: center;
|
|
@@ -5219,7 +5224,7 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5219
5224
|
`,Bb=s(t.SvgClose)`
|
|
5220
5225
|
width: ${t.Space.sp3};
|
|
5221
5226
|
height: ${t.Space.sp3};
|
|
5222
|
-
`,se=t.appLocale.getLocalizedStrings(),$o={navBarHeight:new t.ResponsiveSized(62,62,62),navBarPaddingLeft:new t.ResponsiveSized(t.sp[3],t.sp[3],t.sp[8]),navBarPaddingRight:new t.ResponsiveSized(t.sp[3],t.sp[3],t.sp[8]),navBarPaddingTop:new t.ResponsiveSized(12,12,t.sp[3]),navBarPaddingBottom:new t.ResponsiveSized(12,12,19)},Wb={title:new t.ResponsiveSizedStyle("extraLargeMedium","extraLargeSemiBold")},_b=({companyView:e,allUsers:n,onRetryBankAccountConnection:r,onCloseClick:i})=>{const a=t.useWindowSizeContext(),d=e!=null?
|
|
5227
|
+
`,se=t.appLocale.getLocalizedStrings(),$o={navBarHeight:new t.ResponsiveSized(62,62,62),navBarPaddingLeft:new t.ResponsiveSized(t.sp[3],t.sp[3],t.sp[8]),navBarPaddingRight:new t.ResponsiveSized(t.sp[3],t.sp[3],t.sp[8]),navBarPaddingTop:new t.ResponsiveSized(12,12,t.sp[3]),navBarPaddingBottom:new t.ResponsiveSized(12,12,19)},Wb={title:new t.ResponsiveSizedStyle("extraLargeMedium","extraLargeSemiBold")},_b=({companyView:e,allUsers:n,onRetryBankAccountConnection:r,onCloseClick:i})=>{const a=t.useWindowSizeContext(),d=e!=null?ee.getAuditWarningsCount(e):0,l=e?.onboardingInfo?.bankAccountLinked,c=e?.onboardingInfo?.qboLinked,p=e?.onboardingInfo?.identityVerified,m=e?.onboardingInfo?.businessVerified,x=e?.onboardingInfo?.accountingConnectionCreationMode==="zeni_user",g=[];if(l!=null){const h=n.find(S=>S.userId===l.userIds[0]),{errorMessage:C,successMessage:b}=Vb(l,x,h);g.push({status:C!=null?"Error":b!=null?"Complete":"Incomplete",userInfo:h,message:C??b??`${se.cockpit.onboarding.header.linkBankAccount} ${se.common.strings.hyphen} ${se.common.incompleteText}`,onClickRetry:r})}if(c!=null){const h=n.find(S=>S.userId===c.userIds[0]),{errorMessage:C,successMessage:b}=Ub(c,x,h);g.push({status:C!=null?"Error":b!=null?"Complete":"Incomplete",userInfo:h,message:C??b??`${se.cockpit.onboarding.header.connectToQBO} ${se.common.strings.hyphen} ${se.common.incompleteText}`})}if(p!=null){const h=n.find(S=>S.userId===p.userIds[0]),{errorMessage:C,successMessage:b}=Hb(p,x,h);g.push({status:C!=null?"Error":b!=null?"Complete":"Incomplete",userInfo:h,message:C??b??`${se.cockpit.review.warningsDrawer.kyc} ${se.common.strings.hyphen} ${p.status}`})}if(m!=null){const h=n.find(S=>S.userId===m.userIds[0]),{errorMessage:C,successMessage:b}=Kb(m,x,h);g.push({status:C!=null?"Error":b!=null?"Complete":"Incomplete",userInfo:h,message:C??b??`${se.cockpit.review.warningsDrawer.kyb} ${se.common.strings.hyphen} ${m.status}`})}return o.jsxRuntimeExports.jsxs(Gb,{children:[o.jsxRuntimeExports.jsx(Yb,{windowSize:a,children:o.jsxRuntimeExports.jsx(Zb,{children:o.jsxRuntimeExports.jsxs(Qb,{windowSize:a,children:[o.jsxRuntimeExports.jsx(Jb,{windowSize:a,children:e?.name}),o.jsxRuntimeExports.jsx(aR,{onClick:i,children:o.jsxRuntimeExports.jsx(lR,{})})]})})}),o.jsxRuntimeExports.jsxs(Xb,{children:[o.jsxRuntimeExports.jsx(qb,{children:d>0?o.jsxRuntimeExports.jsxs(is,{children:[o.jsxRuntimeExports.jsx(is,{children:t.capitaliseWords(se.cockpit.review.warningsDrawer.issueFound)}),o.jsxRuntimeExports.jsx(cR,{children:`${se.common.strings.openingBrace}${d}${se.common.strings.closingBrace}`})]}):o.jsxRuntimeExports.jsx(is,{children:`${se.common.no}
|
|
5223
5228
|
${t.capitaliseWords(se.cockpit.review.warningsDrawer.issueFound)}`})}),g.map((h,C)=>o.jsxRuntimeExports.jsx(eR,{isStepInError:h.status==="Error",children:o.jsxRuntimeExports.jsxs(tR,{children:[o.jsxRuntimeExports.jsx(oR,{children:h.status==="Complete"?o.jsxRuntimeExports.jsx(rR,{}):h.status==="Error"?o.jsxRuntimeExports.jsx(t.SvgHighImportanceFilled,{}):o.jsxRuntimeExports.jsx(iR,{})}),o.jsxRuntimeExports.jsxs(nR,{children:[o.jsxRuntimeExports.jsx(sR,{isStepInError:h.status==="Error",children:h.message}),h.status==="Error"?o.jsxRuntimeExports.jsx(t.Button,{label:se.common.retry,onClick:h.onClickRetry,loading:e?.retryBankAccountConnectionFetchState.fetchState==="In-Progress",variant:"outline",style:{padding:`${t.Space.sp1} ${t.Space.sp3}`,borderRadius:t.Space.sp1},textStyle:{...t.textStyles.smallMedium.cssObject}}):null]})]})},C))]})]})},Vb=(e,n,r)=>{const i=e.error===!0?e.errorDetails!=null?e.errorDetails.summary:se.cockpit.review.errors.bankAccountLinked:null,a=e.completed===!0?r!=null?`${se.cockpit.onboarding.header.linkBankAccount} ${se.common.strings.hyphen} ${n===!0?`${se.common.via} ${se.common.cockpit} `:se.common.strings.empty}${se.common.by} ${r.firstName} ${r.lastName}`:se.cockpit.onboarding.header.linkBankAccount:null;return{errorMessage:i,successMessage:a}},Ub=(e,n,r)=>{const i=e.error===!0?e.errorDetails!=null?e.errorDetails.summary:se.cockpit.review.errors.qboLinked:null,a=e.completed===!0?r!=null?`${se.cockpit.onboarding.header.connectToQBO} ${se.common.strings.hyphen} ${n===!0?`${se.common.via} ${se.common.cockpit} `:se.common.strings.empty}${se.common.by} ${r.firstName} ${r.lastName}`:`${se.cockpit.onboarding.header.connectToQBO}`:null;return{errorMessage:i,successMessage:a}},Hb=(e,n,r)=>{const i=e.status==="Error"?r!=null?`${se.cockpit.review.warningsDrawer.kyc} ${se.common.failed.toLocaleLowerCase()} ${se.common.strings.hyphen} ${n===!0?`${se.common.via} ${se.common.cockpit} `:se.common.strings.empty}${se.common.by} ${r.firstName} ${r.lastName}`:`${se.cockpit.review.warningsDrawer.kyc} ${se.common.failed.toLocaleLowerCase()}`:null,a=e.status==="Complete"?r!=null?`${se.cockpit.review.warningsDrawer.kyc} ${se.cockpit.review.warningsDrawer.identity} ${se.common.strings.hyphen} ${n===!0?`${se.common.via} ${se.common.cockpit} `:se.common.strings.empty}${se.common.by} ${r.firstName} ${r.lastName}`:`${se.cockpit.review.warningsDrawer.kyc} ${se.cockpit.review.warningsDrawer.identity}`:null;return{errorMessage:i,successMessage:a}},Kb=(e,n,r)=>{const i=e.status==="Error"?r!=null?`${se.cockpit.review.warningsDrawer.kyb} ${se.common.failed.toLocaleLowerCase()} ${se.common.strings.hyphen} ${n===!0?`${se.common.via} ${se.common.cockpit} `:se.common.strings.empty}${se.common.by} ${r.firstName} ${r.lastName}`:`${se.cockpit.review.warningsDrawer.kyb} ${se.common.failed.toLocaleLowerCase()}`:null,a=e.status==="Complete"?r!=null?`${se.cockpit.review.warningsDrawer.kyb} ${se.cockpit.review.warningsDrawer.identity} ${se.common.strings.hyphen} ${n===!0?`${se.common.via} ${se.common.cockpit} `:se.common.strings.empty}${se.common.by} ${r.firstName} ${r.lastName}`:`${se.cockpit.review.warningsDrawer.kyb} ${se.cockpit.review.warningsDrawer.identity}`:null;return{errorMessage:i,successMessage:a}},Gb=s.div`
|
|
5224
5229
|
display: flex;
|
|
5225
5230
|
flex-direction: column;
|
|
@@ -5844,4 +5849,4 @@ ${e}`,Md=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5844
5849
|
`,q$=s(t.SmallRegularP)`
|
|
5845
5850
|
color: ${e=>e.theme.colors.alert};
|
|
5846
5851
|
margin-top: ${t.Space.sp2};
|
|
5847
|
-
`;exports.AIAgentsActivatingPage=t.AIAgentsActivatingPage;exports.AIIconButton=t.AIIconButton;exports.AIPerformancePage=t.AIPerformancePage;exports.ALL_AI_CFO_MENU_OPTIONS=t.ALL_AI_CFO_MENU_OPTIONS;exports.ALL_INVOICING_MENU_GROUPS=t.ALL_INVOICING_MENU_GROUPS;exports.ALL_INVOICING_MENU_OPTIONS=t.ALL_INVOICING_MENU_OPTIONS;exports.ALL_SETTINGS_MENU_OPTIONS=t.ALL_SETTINGS_MENU_OPTIONS;exports.APP_DRAWER_CONTENT_WIDTH_PX=t.APP_DRAWER_CONTENT_WIDTH_PX;exports.AccountInfoPage=t.AccountInfoPage;exports.AccountLockedInfoModal=t.AccountLockedInfoModal;exports.AccountReconDetailsDrawerPage=t.AccountReconDetailsDrawerPage;exports.AccountReconDetailsDrawerPageV2=t.AccountReconDetailsDrawerPage$1;exports.ActivityIndicator=t.ActivityIndicator;exports.AddAddressForCardDrawer=t.AddAddressForCardDrawer;exports.AddToWalletPage=t.AddToWalletPage;exports.AddressFormPage=t.AddressFormPage;exports.AgingReportsPage=t.AgingReportsPage;exports.AiCfoChatHeader=t.AiCfoChatHeader;exports.AiCfoMenuContent=t.AiCfoMenuContent;exports.AiCfoOnboardingPage=t.AiCfoOnboardingPage;exports.AiCfoPage=t.AiCfoPage;exports.AiCfoScopeModal=t.AiCfoScopeModal;exports.AiCfoScopeModalScrollBody=t.AiCfoScopeModalScrollBody;exports.AiCfoSidePanel=t.AiCfoSidePanel;exports.AiFinanceTeamReadyPage=t.AiFinanceTeamReadyPage;exports.AllowBlockChipPicker=t.AllowBlockChipPicker;exports.AnalyticsOnLoad=t.AnalyticsOnLoad;exports.ApAgingDetailPage=t.ApAgingDetailPage;exports.AppBasePage=t.AppBasePage;exports.AppDrawerContent=t.AppDrawerContent;exports.AppDrawerHeightMobile=t.AppDrawerHeightMobile;exports.ApprovalRulesSettingsPage=t.ApprovalRulesSettingsPage;exports.ArAgingDetailPage=t.ArAgingDetailPage;exports.AskAiCfoNavButton=t.AskAiCfoNavButton;exports.AskAiCfoNavButtonWhenEnabled=t.AskAiCfoNavButtonWhenEnabled;exports.AttachmentView=t.AttachmentView;exports.AutoTransferRulePage=t.AutoTransferRulePage;exports.BackNavigationProvider=t.BackNavigationProvider;exports.BankConnectionsSettingsPage=t.BankConnectionsSettingsPage;exports.BillDetailPage=t.BillDetailPage;exports.BillDetailPageSkeleton=t.BillDetailPageSkeleton;exports.BillPayApprovalRuleDetailPage=t.BillPayApprovalRuleDetailPage;exports.BillPayApprovalRuleDetailPageV1=t.BillPayApprovalRuleDetailPage$1;exports.BillPayApprovalRulesPage=t.BillPayApprovalRulesPage;exports.BillPayApprovalRulesPageV1=t.BillPayApprovalRulesPage$1;exports.BillPayPromoPage=t.BillPayPromoPage;exports.BillPaySetUpLoading=t.SpendManagementSetUpLoading;exports.BillPaySetUpPage=t.BillPaySetUpPage;exports.BillingSettingsPage=t.BillingSettingsPage;exports.BillsBulkReviewDrawerPage=t.BillsBulkReviewDrawerPage;exports.BusinessVerificationPage=t.BusinessVerificationPage;exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT=t.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT;exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION=t.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION;exports.COMMAND_CENTER_SUBMENU_TYPES=t.COMMAND_CENTER_SUBMENU_TYPES;exports.COMMENT_NOTIFICATION_KINDS=t.COMMENT_NOTIFICATION_KINDS;exports.CapitalizationOnboardingPopup=t.CapitalizationOnboardingPopup;exports.CapitalizationSettingsSection=t.CapitalizationSettingsSection;exports.CardPolicyCreatePage=t.CardPolicyCreatePage;exports.CardPolicyEditPage=t.CardPolicyEditPage;exports.CardPolicyFormPageSkeleton=t.CardPolicyFormPageSkeleton;exports.CardPolicyFormSections=t.CardPolicyFormSections;exports.CardPolicyListPage=t.CardPolicyListPage;exports.CardPolicyListPageSkeleton=t.CardPolicyListPageSkeleton;exports.CardPolicyListRow=t.CardPolicyListRow;exports.CardPolicyListSkeletonRow=t.CardPolicyListSkeletonRow;exports.CardPolicyManualEmptyState=t.CardPolicyManualEmptyState;exports.CardsAiCfoHero=t.CardsAiCfoHero;exports.CardsShutdownBanner=t.CardsShutdownBanner;exports.CashbackDetailLoading=t.CashbackDetailLoading;exports.CashbackDetailPage=t.CashbackDetailPage;exports.ChargeCardCVVActivate=t.ChargeCardCVVActivate;exports.ChargeCardDetailLoading=t.ChargeCardDetailLoading;exports.ChargeCardDetailPage=t.ChargeCardDetailPage;exports.ChargeCardListLoading=t.ChargeCardListLoading;exports.ChargeCardListPage=t.ChargeCardListPage;exports.ChargeCardListSkeletonRow=t.ChargeCardListSkeletonRow;exports.ChargeCardPaymentHistoryPage=t.ChargeCardPaymentHistoryPage;exports.ChargeCardPromoPage=t.ChargeCardPromoPage;exports.ChargeCardPromoPageSkeleton=t.ChargeCardPromoPageSkeleton;exports.ChargeCardSetUpPage=t.ChargeCardSetUpPage;exports.ChargeCardSetupLoading=t.SpendManagementSetUpLoading;exports.ChargeCardStatementsLoading=t.ChargeCardStatementsLoading;exports.ChargeCardStatementsPage=t.ChargeCardStatementsPage;exports.ChargeCardUserOnboardingPromoPage=t.ChargeCardUserOnboardingPromoPage;exports.ChargeCardUserOnboardingPromoPageSkeleton=t.ChargeCardUserOnboardingPromoPageSkeleton;exports.CheckDepositDrawerPage=t.CheckDepositDrawerPage;exports.ClickableRow=t.ClickableRow;exports.CollaborationGlobalStyles=t.CollaborationGlobalStyles;exports.CollaborationProvider=t.CollaborationProvider;exports.CollaborationRoomProvider=t.CollaborationRoomProvider;exports.Colors=t.Colors;exports.CommentsAndNotesCount=t.CommentsAndNotesCount;exports.CommentsDrawerProvider=t.CommentsDrawerProvider;exports.CompanyOfficerOnboardingDetailsSection=t.CompanyOfficerOnboardingDetailsSection;exports.CompanyOnboardingDetailsSection=t.CompanyOnboardingDetailsSection;exports.CompanyPassportCard=t.CompanyPassportCard;exports.CompanyPassportPage=t.CompanyPassportPage;exports.CompleteProfile=t.CompleteProfile;exports.ConfettiBurst=t.ConfettiBurst;exports.ConfirmationPopup=t.ConfirmationPopup;exports.ConnectDataSourcesPage=t.ConnectDataSourcesPage;exports.CreateOrEditVendorPage=t.CreateOrEditVendorPage;exports.CreateOrEditVendorPageSkeleton=t.CreateOrEditVendorPageSkeleton;exports.CreatedEntitiesAnswer=t.CreatedEntitiesAnswer;exports.CreatingEntitiesAnswerLoading=t.CreatingEntitiesAnswerLoading;exports.CreditCardPaymentDrawerPage=t.CreditCardPaymentDrawerPage;exports.CustomerOnboardingContainerPage=t.CustomerOnboardingContainerPage;exports.CustomerOnboardingNoStepsPage=t.CustomerOnboardingNoStepsPage;exports.CustomerOnboardingPage=t.CustomerOnboardingPage;exports.CustomerOnboardingProductSuitePage=t.CustomerOnboardingProductSuitePage;exports.Dashboard=t.Dashboard;exports.DashboardReportPage=t.DashboardReportPage;exports.DashboardSidebarLogoAnimation=t.DashboardSidebarLogoAnimation;exports.DataListTable=t.DataListTable;exports.DataListTableHeader=t.DataListTableHeader;exports.DataListTableRow=t.DataListTableRow;exports.DataListTableSortIndicator=t.DataListTableSortIndicator;exports.DebitCardSetPin=t.DebitCardSetPin;exports.DropdownPortalContext=t.DropdownPortalContext;exports.EditPeoplePage=t.EditPeoplePage;exports.EditReimbursementDetailPage=t.EditReimbursementDetailPage;exports.EditableBillDetailPage=t.EditableBillDetailPage;exports.EntityDetailPage=t.EntityDetailPage;exports.ErrorBoundaryWrapper=t.ErrorBoundaryWrapper;exports.ExcludedAccountReconDetailsDrawerPage=t.ExcludedAccountReconDetailsDrawerPage;exports.ExpenseAutomationOverviewPage=t.ExpenseAutomationOverviewPage;exports.ExpenseAutomationOverviewPageSkeleton=t.ExpenseAutomationOverviewPageSkeleton;exports.ExpenseAutomationPage=t.ExpenseAutomationPage;exports.ExpressPayPage=t.ExpressPayPage;exports.FeatureDynamicConfigNames=t.DynamicConfigNames;exports.FeatureGatesNames=t.FeatureGatesNames;exports.FeaturePreviewPage=t.FeaturePreviewPage;exports.FeatureProvider=t.FeatureProvider;exports.FirstReviewVendorDetailPage=t.FirstReviewVendorDetailPage;exports.FontWeight=t.FontWeight;exports.GlobalInfoProvider=t.GlobalInfoProvider;exports.GlobalReviewListPage=t.GlobalReviewListPage;exports.INVOICING_SETTINGS_NAV_SECTIONS=t.INVOICING_SETTINGS_NAV_SECTIONS;exports.INVOICING_SETTINGS_TABS=t.INVOICING_SETTINGS_TABS;exports.InformationCardStack=t.InformationCardStack;exports.InitialCollaborationProvider=t.InitialCollaborationProvider;exports.InsightsCardStack=t.InsightCardStack;exports.IntegrationCardView=t.IntegrationCardView;exports.IntegrationsCardGrid=t.IntegrationsCardGrid;exports.IntegrationsSection=t.IntegrationsSection;exports.IntegrationsSettingsPage=t.IntegrationsSettingsPage;exports.InternationalWireVerificationPage=t.InternationalWireVerificationPage;exports.InviteFormPage=t.InviteFormPage;exports.InvitePageListView=t.InvitePageListView;exports.InvitePeoplePage=t.InvitePeoplePage;exports.InvoiceUploadSection=t.InvoiceUploadSection;exports.InvoiceUploadSectionSkeleton=t.InvoiceUploadSectionSkeleton;exports.InvoicingAddPaymentMethodDialog=t.InvoicingAddPaymentMethodDialog;exports.InvoicingAuditLogPage=t.InvoicingAuditLogPage;exports.InvoicingBrandingSettingsPage=t.InvoicingBrandingSettingsPage;exports.InvoicingCatalogItemDetailPage=t.InvoicingCatalogItemDetailPage;exports.InvoicingCatalogItemFormPage=t.InvoicingCatalogItemFormPage;exports.InvoicingCatalogPage=t.InvoicingCatalogPage;exports.InvoicingCouponFormPage=t.InvoicingCouponFormPage;exports.InvoicingCreateInvoicePage=t.InvoicingCreateInvoicePage;exports.InvoicingCreateInvoiceSkeleton=t.InvoicingCreateInvoiceSkeleton;exports.InvoicingCreatePromotionalCreditsDialog=t.InvoicingCreatePromotionalCreditsDialog;exports.InvoicingCreditDetailPage=t.InvoicingCreditDetailPage;exports.InvoicingCreditListPage=t.InvoicingCreditListPage;exports.InvoicingCustomerDetailPage=t.InvoicingCustomerDetailPage;exports.InvoicingCustomerFormPage=t.InvoicingCustomerFormPage;exports.InvoicingCustomerListPage=t.InvoicingCustomerListPage;exports.InvoicingDashboardSkeleton=t.InvoicingDashboardSkeleton;exports.InvoicingDataImportDetailPage=t.InvoicingDataImportDetailPage;exports.InvoicingDataImportHubPage=t.InvoicingDataImportHubPage;exports.InvoicingDataImportMigratePage=t.InvoicingDataImportMigratePage;exports.InvoicingDetailScaffold=t.InvoicingDetailScaffold;exports.InvoicingDiscountDetailPage=t.InvoicingDiscountDetailPage;exports.InvoicingDiscountListPage=t.InvoicingDiscountListPage;exports.InvoicingDunningDetailPage=t.InvoicingDunningDetailPage;exports.InvoicingDunningListPage=t.InvoicingDunningListPage;exports.InvoicingDunningSettingsPage=t.InvoicingDunningSettingsPage;exports.InvoicingEmptyState=t.InvoicingEmptyState;exports.InvoicingIntegrationsSettingsPage=t.InvoicingIntegrationsSettingsPage;exports.InvoicingInvoiceDetailPage=t.InvoicingInvoiceDetailPage;exports.InvoicingInvoiceListPage=t.InvoicingInvoiceListPage;exports.InvoicingIssueCreditNotePage=t.InvoicingIssueCreditNotePage;exports.InvoicingOverviewPage=t.InvoicingOverviewPage;exports.InvoicingPaymentDestinationSettingsPage=t.InvoicingPaymentDestinationSettingsPage;exports.InvoicingPaymentLinkPage=t.InvoicingPaymentLinkPage;exports.InvoicingPaymentListPage=t.InvoicingPaymentListPage;exports.InvoicingPromoPage=t.InvoicingPromoPage;exports.InvoicingQBOSettingsPage=t.InvoicingQBOSettingsPage;exports.InvoicingRecordPaymentPage=t.InvoicingRecordPaymentPage;exports.InvoicingSettingsHubPage=t.InvoicingSettingsHubPage;exports.InvoicingSettingsPage=t.InvoicingSettingsHubPage;exports.InvoicingSubscriptionDetailPage=t.InvoicingSubscriptionDetailPage;exports.InvoicingSubscriptionFormPage=t.InvoicingSubscriptionFormPage;exports.InvoicingSubscriptionListPage=t.InvoicingSubscriptionListPage;exports.InvoicingTransactionDetailPage=t.InvoicingTransactionDetailPage;exports.InvoicingVoidInvoiceDialog=t.InvoicingVoidInvoiceDialog;exports.IssueChargeCardPage=t.IssueChargeCardPage;exports.IssueChargeCardPageSkeleton=t.IssueChargeCardPageSkeleton;exports.LinkBillExpensePage=t.LinkBillExpensePage;exports.LinkJETransactionPage=t.LinkJETransactionPage;exports.Loader=t.Loader;exports.LogoutButton=t.LogoutButton;exports.MCC_CHIP_ID_PREFIX=t.MCC_CHIP_ID_PREFIX;exports.MagicLinkDomesticWireDetailsPage=t.MagicLinkDomesticWireDetailsPage;exports.MagicLinkInternationalWireDetailsPage=t.MagicLinkInternationalWireDetailsPage;exports.MagicLinkSuccessPage=t.MagicLinkSuccessPage;exports.MagicLinkVendorACHDetailsPage=t.MagicLinkVendorACHDetailsPage;exports.Modal=t.Modal;exports.MonthEndEmailDrawerCustomerRequestPage=t.MonthEndEmailDrawerCustomerRequestPage;exports.MyBankConnectionsSettingsPage=t.MyBankConnectionsSettingsPage;exports.MyPendingActivationChargeCardListPage=t.MyPendingActivationChargeCardListPage;exports.MyProfileSettingsPage=t.MyProfileSettingsPage;exports.NavBar=t.NavBar;exports.NavBarRightRowStyled=t.NavBarRightRowStyled;exports.NewGlobalMerchantPage=t.NewGlobalMerchantPage;exports.NewUpdateAvailablePage=t.NewUpdateAvailablePage;exports.NotFoundPage=t.NotFoundPage;exports.NotificationIcon=t.SvgNotification;exports.NotificationSettingsPage=t.NotificationSettingsPage;exports.NotificationsPage=t.NotificationsPage;exports.OAuthConsentPage=t.OAuthConsentPage;exports.OnboardingInitialLoader=t.OnboardingInitialLoader;exports.OnboardingSidebar=t.OnboardingSidebar;exports.OnboardingStepFrame=t.OnboardingStepFrame;exports.OpExByVendorPage=t.OpExByVendorPage;exports.OverlayContainerPage=t.OverlayContainerPage;exports.PandLWithForecastPage=t.PandLWithForecastPage;exports.PanelInternalContext=t.PanelInternalContext;exports.PaymentAccountSetupBillingAddressSection=t.PaymentAccountSetupBillingAddressSection;exports.PeoplePage=t.PeoplePage;exports.Picker=t.Picker;exports.PolicyLimitsRowList=t.PolicyLimitsRowList;exports.PolicyModeSelector=t.PolicyModeSelector;exports.PortfolioAllocationFormPage=t.PortfolioAllocationFormPage;exports.QBOConnectionDialog=t.QBOConnectionDialog;exports.QBOSetupSectionWithForm=t.QBOSetupSectionWithForm;exports.QuickResponsesPage=t.QuickResponsesPage;exports.QuickViewModeContext=t.QuickViewModeContext;exports.RIGHT_SIDE_PANEL_WIDTH_PX=t.RIGHT_SIDE_PANEL_WIDTH_PX;exports.ReferralDrawerPage=t.DrawerPage;exports.ReimbursementApprovalRuleDetailPage=t.ReimbursementApprovalRuleDetailPage;exports.ReimbursementApprovalRuleDetailPageV1=t.ReimbursementApprovalRuleDetailPage$1;exports.ReimbursementApprovalRulesPage=t.ReimbursementApprovalRulesPage;exports.ReimbursementApprovalRulesPageV1=t.ReimbursementApprovalRulesPage$1;exports.ReimbursementDetailPage=t.ReimbursementDetailPage;exports.ReimbursementDetailPageSkeleton=t.ReimbursementDetailPageSkeleton;exports.ReimbursementPromoPage=t.ReimbursementPromoPage;exports.ReimbursementSetUpLoading=t.SpendManagementSetUpLoading;exports.ReimbursementSetUpPage=t.RemiSetupPage;exports.RemisBulkReviewDrawerPage=t.ReimbursementsBulkReviewDrawerPage;exports.ReportsPage=t.ReportsPage;exports.ResponsiveSized=t.ResponsiveSized;exports.ReviewBillDetailsPage=t.ReviewBillDetailsPage;exports.ReviewConfirmTransferPanel=t.ReviewConfirmTransferPanel;exports.ReviewDetailsPageSkeleton=t.ReviewDetailsPageSkeleton;exports.ScheduleDetailSkeleton=t.ScheduleDetailSkeleton;exports.ScheduleDetailsAccruedExpensesPage=t.ScheduleDetailsAccruedExpensesPage;exports.ScheduleDetailsFixedAssetsPage=t.ScheduleDetailsFixedAssetsPage;exports.ScheduleDetailsPage=t.ScheduleDetailsPage;exports.SchedulePanelInternalContext=t.SchedulePanelInternalContext;exports.SearchableCheckboxCardList=t.SearchableCheckboxCardList;exports.SessionTimeoutPopup=t.SessionTimeoutPopup;exports.SidePanelContext=t.SidePanelContext;exports.SidePanelProvider=t.SidePanelProvider;exports.SignIn=t.SignIn;exports.SomethingWrongPage=t.SomethingWrongPage;exports.Space=t.Space;exports.SpendManagementListLoading=t.SpendManagementListLoading;exports.SpendManagementListViewPage=t.SpendManagementListViewPage;exports.StatementParseInfo=t.StatementParseInfo;exports.StatementProcessingPage=t.StatementProcessingPage;exports.StatementsPage=t.StatementsPage;exports.StyledCapsule=t.StyledCapsule;exports.SubscriptionDetailPage=t.SubscriptionDetailPage;exports.SubscriptionSummaryPage=t.SubscriptionSummaryPage;exports.SyntheticAiCfoAnswerView=t.SyntheticAiCfoAnswerView;exports.THREAD_RESOLVED_NOTIFICATION_KIND=t.THREAD_RESOLVED_NOTIFICATION_KIND;exports.THREAD_UNRESOLVED_NOTIFICATION_KIND=t.THREAD_UNRESOLVED_NOTIFICATION_KIND;exports.TaskDetailPage=t.TaskDetailPage;exports.TaskManagementPage=t.TaskManagementPage;exports.TenantsDropDown=t.TenantsDropDown;exports.TextStyle=t.TextStyle;exports.ToolkitProvider=t.ToolkitProvider;exports.TopExDetailPage=t.TopExDetailPage;exports.TransactionActivityLogPage=t.TransactionActivityLogPage;exports.TransactionActivityLogPanel=t.TransactionActivityLogPanel;exports.TransactionDetailPage=t.TransactionDetailPage;exports.TransactionDetailSkeleton=t.TransactionDetailSkeleton;exports.TransactionListBig=t.TransactionListBig;exports.TransactionListComments=t.TransactionListComments;exports.TransactionListPage=t.TransactionListPage;exports.TransactionPanelInternalContext=t.TransactionPanelInternalContext;exports.TransactionSidePanelLayout=t.TransactionSidePanelLayout;exports.TransactionVendorDetailPage=t.TransactionVendorDetailPage;exports.TransferDrawerPage=t.TransferDrawerPage;exports.TreasuryOverviewPage=t.TreasuryOverviewPage;exports.TreasuryPromoPage=t.TreasuryPromoPage;exports.TreasurySetUpPage=t.TreasurySetUpPage;exports.TreasuryStatementsPage=t.TreasuryStatementsPage;exports.TreasuryTaxLetterPage=t.TreasuryTaxLetterPage;exports.TreasuryTransferOrReviewPage=t.TreasuryTransferOrReviewPage;exports.TrendChart=t.TrendChart;exports.UncategorizedAccountsMappingPage=t.UncategorizedAccountsMappingPage;exports.UnitIntegrationPage=t.UnitIntegrationPage;exports.VENDOR_CHIP_ID_PREFIX=t.VENDOR_CHIP_ID_PREFIX;exports.Vendor2FAPopup=t.Vendor2FAPopup;exports.VendorACHDetailsPage=t.VendorACHDetailsPage;exports.VendorAccruedSchedulesPage=t.VendorAccruedSchedulesPage;exports.VendorDetailPage=t.VendorDetailPage;exports.VendorDomesticWireDetailsPage=t.VendorDomesticWireDetailsPage;exports.VendorFiling1099DetailsEditablePage=t.VendorFiling1099DetailsEditablePage;exports.VendorFiling1099EditableFormSkeleton=t.VendorFiling1099EditableFormSkeleton;exports.VendorFiling1099ListPage=t.VendorFiling1099ListPage;exports.VendorFirstReviewPage=t.VendorFirstReviewPage;exports.VendorInternationalSwiftBasedDetailsPage=t.VendorInternationalSwiftBasedDetailsPage;exports.VendorInternationalWireDetailsPage=t.VendorInternationalWireDetailsPage;exports.VendorListPage=t.VendorListPage;exports.VendorSchedulesPage=t.VendorSchedulesPage;exports.VerificationFrame=t.VerificationFrame;exports.VerifyDevice=t.VerifyDevice;exports.VerifyUnlockFinancialStackPage=t.VerifyUnlockFinancialStackPage;exports.WebV2MicroService=t.WebV2MicroService;exports.WebV2MicroServiceProvider=t.WebV2MicroServiceProvider;exports.WelcomeAnimation=t.WelcomeAnimation;exports.WindowSizeProvider=t.WindowSizeProvider;exports.ZeniAccountDetailLoading=t.ZeniAccountDetailLoading;exports.ZeniAccountDetailNavBarTitleShimmer=t.ZeniAccountDetailNavBarTitleShimmer;exports.ZeniAccountDetailPage=t.ZeniAccountDetailPage;exports.ZeniAccountListLoading=t.ZeniAccountListLoading;exports.ZeniAccountListViewPage=t.ZeniAccountListViewPage;exports.ZeniAccountPromoPage=t.ZeniAccountPromoPage;exports.ZeniAccountSetUpPage=t.ZeniAccountSetUpPage;exports.ZeniText=t.ZeniText;exports.ZeniThemeProvider=t.ZeniThemeProvider;exports.alignToJustify=t.alignToJustify;exports.amountToString=t.amountToString;exports.amountValueToString=t.amountValueToString;exports.appLocale=t.appLocale;exports.applyExtractedPolicyRulesToFormValues=t.applyExtractedPolicyRulesToFormValues;exports.buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm=t.buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm;exports.buildCardPolicyFormValuesFromRequest=t.buildCardPolicyFormValuesFromRequest;exports.buildCreateCardPolicyTemplateRequest=t.buildCreateCardPolicyTemplateRequest;exports.buildCreateCardPolicyTemplateRequestFromInteractiveForm=t.buildCreateCardPolicyTemplateRequestFromInteractiveForm;exports.buildMccCategoryChipId=t.buildMccCategoryChipId;exports.buildStickyKeySet=t.buildStickyKeySet;exports.buildVendorChipId=t.buildVendorChipId;exports.buildVoidInvoiceSubmitBody=t.buildVoidInvoiceSubmitBody;exports.cellVerticalAlignToFlexAlign=t.cellVerticalAlignToFlexAlign;exports.clearAutoLogoutContext=t.clearAutoLogoutContext;exports.clickableRowStyles=t.clickableRowStyles;exports.computeStatementProcessingStepsFromElapsedTime=t.computeStatementProcessingStepsFromElapsedTime;exports.computeStickyLeftOffsets=t.computeStickyLeftOffsets;exports.darkColors=t.darkColors;exports.darkTheme=t.darkTheme;exports.dashboardCardDimension=t.designDimension;exports.defaultCardPolicyFormValues=t.defaultCardPolicyFormValues;exports.formatReconAccountDisplayName=t.formatReconAccountDisplayName;exports.getAlpha2=t.getAlpha2;exports.getAlpha3=t.getAlpha3;exports.getColorForALabel=t.getColorForALabel;exports.getCountries=t.getCountries;exports.getCustomerDataFromAutoComplete=t.getCustomerDataFromAutoComplete;exports.getFullName=t.getFullName;exports.getInitialOpenThreadRequestFromSearch=t.getInitialOpenThreadRequestFromSearch;exports.getRecipientTotalAmount=t.getRecipientTotalAmount;exports.getReconAccountDisplayName=t.getReconAccountDisplayName;exports.getShowNegativeAmountInParenthesisDefaultValue=t.getShowNegativeAmountInParenthesisDefaultValue;exports.getShowNegativeAmountInParenthesisForPercentDefaultValue=t.getShowNegativeAmountInParenthesisForPercentDefaultValue;exports.getStableTransactionId=t.getStableTransactionId;exports.getStatementParseTransactionCount=t.getStatementParseTransactionCount;exports.invoicingMenuList=t.invoicingMenuList;exports.isBackdatedInvoiceDate=t.isBackdatedInvoiceDate;exports.isCloseManagementMenu=t.isCloseManagementMenu;exports.isClosedCardStatus=t.isClosedCardStatus;exports.isCollaborationEntityType=t.isCollaborationEntityType;exports.isCommentNotificationKind=t.isCommentNotificationKind;exports.isMobileOrTabletView=t.isMobileOrTabletView;exports.isMobilePhoneScreen=t.isMobilePhoneScreen;exports.lightColors=t.lightColors;exports.lightTheme=t.lightTheme;exports.menuList=t.menuList;exports.mergeColumnDeclarativeWithRenderers=t.mergeColumnDeclarativeWithRenderers;exports.mergeLayoutDefaults=t.mergeLayoutDefaults;exports.percentValueToString=t.percentValueToString;exports.resolveBackgroundStatementProcessingCompletedSteps=t.resolveBackgroundStatementProcessingCompletedSteps;exports.resolveColumnWidth=t.resolveColumnWidth;exports.roundAmountIfNeeded=t.roundAmountIfNeeded;exports.roundOffNumberToTwoDecimal=t.roundOffNumberToTwoDecimal;exports.setAutoLogoutContext=t.setAutoLogoutContext;exports.setShowNegativeAmountInParenthesisDefaultValue=t.setShowNegativeAmountInParenthesisDefaultValue;exports.setShowNegativeAmountInParenthesisForPercentDefaultValue=t.setShowNegativeAmountInParenthesisForPercentDefaultValue;exports.settingMenuList=t.settingMenuList;exports.shouldDefaultAdjustmentCreditNote=t.shouldDefaultAdjustmentCreditNote;exports.sp=t.sp;exports.textAlignForCell=t.textAlignForCell;exports.textStyles=t.textStyles;exports.toInstitutionLogoDataUri=t.toInstitutionLogoDataUri;exports.toInvoicingMenuOptionType=t.toInvoicingMenuOptionType;exports.toInvoicingMenuOptionTypeStrict=t.toInvoicingMenuOptionTypeStrict;exports.toMccCategoryChipFieldValue=t.toMccCategoryChipFieldValue;exports.toMenuOptionType=t.toMenuOptionType;exports.toSettingsMenuOptionTypeStrict=t.toSettingsMenuOptionTypeStrict;exports.toSupportedLocaleStrict=t.toSupportedLocaleStrict;exports.toVendorChipFieldValue=t.toVendorChipFieldValue;exports.trackTreasuryTransferAnalytics=t.trackTreasuryTransferAnalytics;exports.uploadAttachmentReceipts=t.uploadAttachmentReceipts;exports.useApprovalRulesV3Config=t.useApprovalRulesV3Config;exports.useBackNavigation=t.useBackNavigation;exports.useCollaborationInfoContext=t.useCollaborationInfoContext;exports.useCommentsDrawer=t.useCommentsDrawer;exports.useDropdownPortal=t.useDropdownPortal;exports.useExpenseAutomationEnabledForUser=t.useExpenseAutomationEnabledForUser;exports.useGlobalInfoContext=t.useGlobalInfoContext;exports.useLockBodyScroll=t.useLockBodyScroll;exports.usePanelInternal=t.usePanelInternal;exports.usePrevious=t.usePrevious;exports.useQuickViewMode=t.useQuickViewMode;exports.useRegisterBackHandler=t.useRegisterBackHandler;exports.useRequestCloseAllCommentDrawers=t.useRequestCloseAllCommentDrawers;exports.useSchedulePanelInternal=t.useSchedulePanelInternal;exports.useSessionAutoLogoutConfig=t.useSessionAutoLogoutConfig;exports.useSidePanelContext=t.useSidePanelContext;exports.useToolkitContext=t.useToolkitContext;exports.useTransactionPanelInternal=t.useTransactionPanelInternal;exports.useWindowSizeContext=t.useWindowSizeContext;exports.useZeniCardsVisibilityConfig=t.useZeniCardsVisibilityConfig;exports.useZeniFeatureContext=t.useZeniFeatureContext;exports.useZeniThemeContext=t.useZeniThemeContext;exports.waitFor=t.waitFor;exports.useZeniTheme=o.useTheme;exports.zeniStyled=o.styled;exports.zeniEmotionStyled=s;Object.defineProperty(exports,"buildInvoicingEntityPath",{enumerable:!0,get:()=>J.buildInvoicingEntityPath});Object.defineProperty(exports,"isInvoicingEntityLinkable",{enumerable:!0,get:()=>J.isInvoicingEntityLinkable});exports.AiAccountantDetailDrawer=Dy;exports.AiAccountantPage=rf;exports.AuditReportDrawerPage=Rb;exports.COCKPIT_TAB_OPTIONS=it;exports.COCKPIT_TAB_OPTIONS_WITH_CREDIT_AGENT=tl;exports.CockpitNavBar=Pl;exports.CreditAgentPage=A$;exports.HealthMonitorDetailDrawer=gx;exports.HealthMonitorPage=Gh;exports.ManagementPage=Pu;exports.MonthEndReportHistoricDataPage=nj;exports.MonthEndReportPage=M3;exports.NavHeader=dt;exports.OnboardingCustomerPage=OC;exports.OnboardingPage=F2;exports.PortfolioPage=ky;exports.ReviewPage=l4;exports.SubscriptionAddPlanPage=PS;exports.SubscriptionPage=o1;exports.SubscriptionUpdatePlanPage=pS;exports.TaskManagerPage=Ju;exports.WarningsDrawerPage=_b;exports.toCockpitOptionType=Rt;exports.toCockpitOptionTypeStrict=Il;
|
|
5852
|
+
`;exports.AIAgentsActivatingPage=t.AIAgentsActivatingPage;exports.AIIconButton=t.AIIconButton;exports.AIPerformancePage=t.AIPerformancePage;exports.ALL_AI_CFO_MENU_OPTIONS=t.ALL_AI_CFO_MENU_OPTIONS;exports.ALL_INVOICING_MENU_GROUPS=t.ALL_INVOICING_MENU_GROUPS;exports.ALL_INVOICING_MENU_OPTIONS=t.ALL_INVOICING_MENU_OPTIONS;exports.ALL_SETTINGS_MENU_OPTIONS=t.ALL_SETTINGS_MENU_OPTIONS;exports.APP_DRAWER_CONTENT_WIDTH_PX=t.APP_DRAWER_CONTENT_WIDTH_PX;exports.AccountInfoPage=t.AccountInfoPage;exports.AccountLockedInfoModal=t.AccountLockedInfoModal;exports.AccountReconDetailsDrawerPage=t.AccountReconDetailsDrawerPage;exports.AccountReconDetailsDrawerPageV2=t.AccountReconDetailsDrawerPage$1;exports.ActivityIndicator=t.ActivityIndicator;exports.AddAddressForCardDrawer=t.AddAddressForCardDrawer;exports.AddToWalletPage=t.AddToWalletPage;exports.AddressFormPage=t.AddressFormPage;exports.AgingReportsPage=t.AgingReportsPage;exports.AiCfoChatHeader=t.AiCfoChatHeader;exports.AiCfoMenuContent=t.AiCfoMenuContent;exports.AiCfoOnboardingPage=t.AiCfoOnboardingPage;exports.AiCfoPage=t.AiCfoPage;exports.AiCfoScopeModal=t.AiCfoScopeModal;exports.AiCfoScopeModalScrollBody=t.AiCfoScopeModalScrollBody;exports.AiCfoSidePanel=t.AiCfoSidePanel;exports.AiFinanceTeamReadyPage=t.AiFinanceTeamReadyPage;exports.AllowBlockChipPicker=t.AllowBlockChipPicker;exports.AnalyticsOnLoad=t.AnalyticsOnLoad;exports.ApAgingDetailPage=t.ApAgingDetailPage;exports.AppBasePage=t.AppBasePage;exports.AppDrawerContent=t.AppDrawerContent;exports.AppDrawerHeightMobile=t.AppDrawerHeightMobile;exports.ApprovalRulesSettingsPage=t.ApprovalRulesSettingsPage;exports.ArAgingDetailPage=t.ArAgingDetailPage;exports.AskAiCfoNavButton=t.AskAiCfoNavButton;exports.AskAiCfoNavButtonWhenEnabled=t.AskAiCfoNavButtonWhenEnabled;exports.AttachmentView=t.AttachmentView;exports.AutoTransferRulePage=t.AutoTransferRulePage;exports.BackNavigationProvider=t.BackNavigationProvider;exports.BankConnectionsSettingsPage=t.BankConnectionsSettingsPage;exports.BillDetailPage=t.BillDetailPage;exports.BillDetailPageSkeleton=t.BillDetailPageSkeleton;exports.BillPayApprovalRuleDetailPage=t.BillPayApprovalRuleDetailPage;exports.BillPayApprovalRuleDetailPageV1=t.BillPayApprovalRuleDetailPage$1;exports.BillPayApprovalRulesPage=t.BillPayApprovalRulesPage;exports.BillPayApprovalRulesPageV1=t.BillPayApprovalRulesPage$1;exports.BillPayPromoPage=t.BillPayPromoPage;exports.BillPaySetUpLoading=t.SpendManagementSetUpLoading;exports.BillPaySetUpPage=t.BillPaySetUpPage;exports.BillingSettingsPage=t.BillingSettingsPage;exports.BillsBulkReviewDrawerPage=t.BillsBulkReviewDrawerPage;exports.BusinessVerificationPage=t.BusinessVerificationPage;exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT=t.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT;exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION=t.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION;exports.COMMAND_CENTER_SUBMENU_TYPES=t.COMMAND_CENTER_SUBMENU_TYPES;exports.COMMENT_NOTIFICATION_KINDS=t.COMMENT_NOTIFICATION_KINDS;exports.CapitalizationOnboardingPopup=t.CapitalizationOnboardingPopup;exports.CapitalizationSettingsSection=t.CapitalizationSettingsSection;exports.CardPolicyCreatePage=t.CardPolicyCreatePage;exports.CardPolicyEditPage=t.CardPolicyEditPage;exports.CardPolicyFormPageSkeleton=t.CardPolicyFormPageSkeleton;exports.CardPolicyFormSections=t.CardPolicyFormSections;exports.CardPolicyListPage=t.CardPolicyListPage;exports.CardPolicyListPageSkeleton=t.CardPolicyListPageSkeleton;exports.CardPolicyListRow=t.CardPolicyListRow;exports.CardPolicyListSkeletonRow=t.CardPolicyListSkeletonRow;exports.CardPolicyManualEmptyState=t.CardPolicyManualEmptyState;exports.CardsAiCfoHero=t.CardsAiCfoHero;exports.CardsShutdownBanner=t.CardsShutdownBanner;exports.CashbackDetailLoading=t.CashbackDetailLoading;exports.CashbackDetailPage=t.CashbackDetailPage;exports.ChargeCardCVVActivate=t.ChargeCardCVVActivate;exports.ChargeCardDetailLoading=t.ChargeCardDetailLoading;exports.ChargeCardDetailPage=t.ChargeCardDetailPage;exports.ChargeCardListLoading=t.ChargeCardListLoading;exports.ChargeCardListPage=t.ChargeCardListPage;exports.ChargeCardListSkeletonRow=t.ChargeCardListSkeletonRow;exports.ChargeCardPaymentHistoryPage=t.ChargeCardPaymentHistoryPage;exports.ChargeCardPromoPage=t.ChargeCardPromoPage;exports.ChargeCardPromoPageSkeleton=t.ChargeCardPromoPageSkeleton;exports.ChargeCardSetUpPage=t.ChargeCardSetUpPage;exports.ChargeCardSetupLoading=t.SpendManagementSetUpLoading;exports.ChargeCardStatementsLoading=t.ChargeCardStatementsLoading;exports.ChargeCardStatementsPage=t.ChargeCardStatementsPage;exports.ChargeCardUserOnboardingPromoPage=t.ChargeCardUserOnboardingPromoPage;exports.ChargeCardUserOnboardingPromoPageSkeleton=t.ChargeCardUserOnboardingPromoPageSkeleton;exports.CheckDepositDrawerPage=t.CheckDepositDrawerPage;exports.ClickableRow=t.ClickableRow;exports.CollaborationGlobalStyles=t.CollaborationGlobalStyles;exports.CollaborationProvider=t.CollaborationProvider;exports.CollaborationRoomProvider=t.CollaborationRoomProvider;exports.Colors=t.Colors;exports.CommentsAndNotesCount=t.CommentsAndNotesCount;exports.CommentsDrawerProvider=t.CommentsDrawerProvider;exports.CompanyOfficerOnboardingDetailsSection=t.CompanyOfficerOnboardingDetailsSection;exports.CompanyOnboardingDetailsSection=t.CompanyOnboardingDetailsSection;exports.CompanyPassportCard=t.CompanyPassportCard;exports.CompanyPassportPage=t.CompanyPassportPage;exports.CompleteProfile=t.CompleteProfile;exports.ConfettiBurst=t.ConfettiBurst;exports.ConfirmationPopup=t.ConfirmationPopup;exports.ConnectDataSourcesPage=t.ConnectDataSourcesPage;exports.CreateOrEditVendorPage=t.CreateOrEditVendorPage;exports.CreateOrEditVendorPageSkeleton=t.CreateOrEditVendorPageSkeleton;exports.CreatedEntitiesAnswer=t.CreatedEntitiesAnswer;exports.CreatingEntitiesAnswerLoading=t.CreatingEntitiesAnswerLoading;exports.CreditCardPaymentDrawerPage=t.CreditCardPaymentDrawerPage;exports.CustomerOnboardingContainerPage=t.CustomerOnboardingContainerPage;exports.CustomerOnboardingNoStepsPage=t.CustomerOnboardingNoStepsPage;exports.CustomerOnboardingPage=t.CustomerOnboardingPage;exports.CustomerOnboardingProductSuitePage=t.CustomerOnboardingProductSuitePage;exports.Dashboard=t.Dashboard;exports.DashboardReportPage=t.DashboardReportPage;exports.DashboardSidebarLogoAnimation=t.DashboardSidebarLogoAnimation;exports.DataListTable=t.DataListTable;exports.DataListTableHeader=t.DataListTableHeader;exports.DataListTableRow=t.DataListTableRow;exports.DataListTableSortIndicator=t.DataListTableSortIndicator;exports.DebitCardSetPin=t.DebitCardSetPin;exports.DropdownPortalContext=t.DropdownPortalContext;exports.EditPeoplePage=t.EditPeoplePage;exports.EditReimbursementDetailPage=t.EditReimbursementDetailPage;exports.EditableBillDetailPage=t.EditableBillDetailPage;exports.EntityDetailPage=t.EntityDetailPage;exports.ErrorBoundaryWrapper=t.ErrorBoundaryWrapper;exports.ExcludedAccountReconDetailsDrawerPage=t.ExcludedAccountReconDetailsDrawerPage;exports.ExpenseAutomationOverviewPage=t.ExpenseAutomationOverviewPage;exports.ExpenseAutomationOverviewPageSkeleton=t.ExpenseAutomationOverviewPageSkeleton;exports.ExpenseAutomationPage=t.ExpenseAutomationPage;exports.ExpressPayPage=t.ExpressPayPage;exports.FeatureDynamicConfigNames=t.DynamicConfigNames;exports.FeatureGatesNames=t.FeatureGatesNames;exports.FeaturePreviewPage=t.FeaturePreviewPage;exports.FeatureProvider=t.FeatureProvider;exports.FirstReviewVendorDetailPage=t.FirstReviewVendorDetailPage;exports.FontWeight=t.FontWeight;exports.GlobalInfoProvider=t.GlobalInfoProvider;exports.GlobalReviewListPage=t.GlobalReviewListPage;exports.INVOICING_SETTINGS_NAV_SECTIONS=t.INVOICING_SETTINGS_NAV_SECTIONS;exports.INVOICING_SETTINGS_TABS=t.INVOICING_SETTINGS_TABS;exports.InformationCardStack=t.InformationCardStack;exports.InitialCollaborationProvider=t.InitialCollaborationProvider;exports.InsightsCardStack=t.InsightCardStack;exports.IntegrationCardView=t.IntegrationCardView;exports.IntegrationsCardGrid=t.IntegrationsCardGrid;exports.IntegrationsSection=t.IntegrationsSection;exports.IntegrationsSettingsPage=t.IntegrationsSettingsPage;exports.InternationalWireVerificationPage=t.InternationalWireVerificationPage;exports.InviteFormPage=t.InviteFormPage;exports.InvitePageListView=t.InvitePageListView;exports.InvitePeoplePage=t.InvitePeoplePage;exports.InvoiceUploadSection=t.InvoiceUploadSection;exports.InvoiceUploadSectionSkeleton=t.InvoiceUploadSectionSkeleton;exports.InvoicingAddPaymentMethodDialog=t.InvoicingAddPaymentMethodDialog;exports.InvoicingAuditLogPage=t.InvoicingAuditLogPage;exports.InvoicingBrandingSettingsPage=t.InvoicingBrandingSettingsPage;exports.InvoicingCatalogItemDetailPage=t.InvoicingCatalogItemDetailPage;exports.InvoicingCatalogItemFormPage=t.InvoicingCatalogItemFormPage;exports.InvoicingCatalogPage=t.InvoicingCatalogPage;exports.InvoicingCouponFormPage=t.InvoicingCouponFormPage;exports.InvoicingCreateInvoicePage=t.InvoicingCreateInvoicePage;exports.InvoicingCreateInvoiceSkeleton=t.InvoicingCreateInvoiceSkeleton;exports.InvoicingCreatePromotionalCreditsDialog=t.InvoicingCreatePromotionalCreditsDialog;exports.InvoicingCreditDetailPage=t.InvoicingCreditDetailPage;exports.InvoicingCreditListPage=t.InvoicingCreditListPage;exports.InvoicingCustomerDetailPage=t.InvoicingCustomerDetailPage;exports.InvoicingCustomerFormPage=t.InvoicingCustomerFormPage;exports.InvoicingCustomerListPage=t.InvoicingCustomerListPage;exports.InvoicingDashboardSkeleton=t.InvoicingDashboardSkeleton;exports.InvoicingDataImportDetailPage=t.InvoicingDataImportDetailPage;exports.InvoicingDataImportHubPage=t.InvoicingDataImportHubPage;exports.InvoicingDataImportMigratePage=t.InvoicingDataImportMigratePage;exports.InvoicingDetailScaffold=t.InvoicingDetailScaffold;exports.InvoicingDiscountDetailPage=t.InvoicingDiscountDetailPage;exports.InvoicingDiscountListPage=t.InvoicingDiscountListPage;exports.InvoicingDunningDetailPage=t.InvoicingDunningDetailPage;exports.InvoicingDunningEmailComposerDialog=t.InvoicingDunningEmailComposerDialog;exports.InvoicingDunningListPage=t.InvoicingDunningListPage;exports.InvoicingDunningSettingsPage=t.InvoicingDunningSettingsPage;exports.InvoicingEmptyState=t.InvoicingEmptyState;exports.InvoicingIntegrationsSettingsPage=t.InvoicingIntegrationsSettingsPage;exports.InvoicingInvoiceDetailPage=t.InvoicingInvoiceDetailPage;exports.InvoicingInvoiceListPage=t.InvoicingInvoiceListPage;exports.InvoicingIssueCreditNotePage=t.InvoicingIssueCreditNotePage;exports.InvoicingOverviewPage=t.InvoicingOverviewPage;exports.InvoicingPaymentDestinationSettingsPage=t.InvoicingPaymentDestinationSettingsPage;exports.InvoicingPaymentLinkPage=t.InvoicingPaymentLinkPage;exports.InvoicingPaymentListPage=t.InvoicingPaymentListPage;exports.InvoicingPromoPage=t.InvoicingPromoPage;exports.InvoicingQBOSettingsPage=t.InvoicingQBOSettingsPage;exports.InvoicingRecordPaymentPage=t.InvoicingRecordPaymentPage;exports.InvoicingSettingsHubPage=t.InvoicingSettingsHubPage;exports.InvoicingSettingsPage=t.InvoicingSettingsHubPage;exports.InvoicingSubscriptionDetailPage=t.InvoicingSubscriptionDetailPage;exports.InvoicingSubscriptionFormPage=t.InvoicingSubscriptionFormPage;exports.InvoicingSubscriptionListPage=t.InvoicingSubscriptionListPage;exports.InvoicingTransactionDetailPage=t.InvoicingTransactionDetailPage;exports.InvoicingVoidInvoiceDialog=t.InvoicingVoidInvoiceDialog;exports.IssueChargeCardPage=t.IssueChargeCardPage;exports.IssueChargeCardPageSkeleton=t.IssueChargeCardPageSkeleton;exports.LinkBillExpensePage=t.LinkBillExpensePage;exports.LinkJETransactionPage=t.LinkJETransactionPage;exports.Loader=t.Loader;exports.LogoutButton=t.LogoutButton;exports.MCC_CHIP_ID_PREFIX=t.MCC_CHIP_ID_PREFIX;exports.MagicLinkDomesticWireDetailsPage=t.MagicLinkDomesticWireDetailsPage;exports.MagicLinkInternationalWireDetailsPage=t.MagicLinkInternationalWireDetailsPage;exports.MagicLinkSuccessPage=t.MagicLinkSuccessPage;exports.MagicLinkVendorACHDetailsPage=t.MagicLinkVendorACHDetailsPage;exports.Modal=t.Modal;exports.MonthEndEmailDrawerCustomerRequestPage=t.MonthEndEmailDrawerCustomerRequestPage;exports.MyBankConnectionsSettingsPage=t.MyBankConnectionsSettingsPage;exports.MyPendingActivationChargeCardListPage=t.MyPendingActivationChargeCardListPage;exports.MyProfileSettingsPage=t.MyProfileSettingsPage;exports.NavBar=t.NavBar;exports.NavBarRightRowStyled=t.NavBarRightRowStyled;exports.NewGlobalMerchantPage=t.NewGlobalMerchantPage;exports.NewUpdateAvailablePage=t.NewUpdateAvailablePage;exports.NotFoundPage=t.NotFoundPage;exports.NotificationIcon=t.SvgNotification;exports.NotificationSettingsPage=t.NotificationSettingsPage;exports.NotificationsPage=t.NotificationsPage;exports.OAuthConsentPage=t.OAuthConsentPage;exports.OnboardingInitialLoader=t.OnboardingInitialLoader;exports.OnboardingSidebar=t.OnboardingSidebar;exports.OnboardingStepFrame=t.OnboardingStepFrame;exports.OpExByVendorPage=t.OpExByVendorPage;exports.OverlayContainerPage=t.OverlayContainerPage;exports.PandLWithForecastPage=t.PandLWithForecastPage;exports.PanelInternalContext=t.PanelInternalContext;exports.PaymentAccountSetupBillingAddressSection=t.PaymentAccountSetupBillingAddressSection;exports.PeoplePage=t.PeoplePage;exports.Picker=t.Picker;exports.PolicyLimitsRowList=t.PolicyLimitsRowList;exports.PolicyModeSelector=t.PolicyModeSelector;exports.PortfolioAllocationFormPage=t.PortfolioAllocationFormPage;exports.QBOConnectionDialog=t.QBOConnectionDialog;exports.QBOSetupSectionWithForm=t.QBOSetupSectionWithForm;exports.QuickResponsesPage=t.QuickResponsesPage;exports.QuickViewModeContext=t.QuickViewModeContext;exports.RIGHT_SIDE_PANEL_WIDTH_PX=t.RIGHT_SIDE_PANEL_WIDTH_PX;exports.ReferralDrawerPage=t.DrawerPage;exports.ReimbursementApprovalRuleDetailPage=t.ReimbursementApprovalRuleDetailPage;exports.ReimbursementApprovalRuleDetailPageV1=t.ReimbursementApprovalRuleDetailPage$1;exports.ReimbursementApprovalRulesPage=t.ReimbursementApprovalRulesPage;exports.ReimbursementApprovalRulesPageV1=t.ReimbursementApprovalRulesPage$1;exports.ReimbursementDetailPage=t.ReimbursementDetailPage;exports.ReimbursementDetailPageSkeleton=t.ReimbursementDetailPageSkeleton;exports.ReimbursementPromoPage=t.ReimbursementPromoPage;exports.ReimbursementSetUpLoading=t.SpendManagementSetUpLoading;exports.ReimbursementSetUpPage=t.RemiSetupPage;exports.RemisBulkReviewDrawerPage=t.ReimbursementsBulkReviewDrawerPage;exports.ReportsPage=t.ReportsPage;exports.ResponsiveSized=t.ResponsiveSized;exports.ReviewBillDetailsPage=t.ReviewBillDetailsPage;exports.ReviewConfirmTransferPanel=t.ReviewConfirmTransferPanel;exports.ReviewDetailsPageSkeleton=t.ReviewDetailsPageSkeleton;exports.ScheduleDetailSkeleton=t.ScheduleDetailSkeleton;exports.ScheduleDetailsAccruedExpensesPage=t.ScheduleDetailsAccruedExpensesPage;exports.ScheduleDetailsFixedAssetsPage=t.ScheduleDetailsFixedAssetsPage;exports.ScheduleDetailsPage=t.ScheduleDetailsPage;exports.SchedulePanelInternalContext=t.SchedulePanelInternalContext;exports.SearchableCheckboxCardList=t.SearchableCheckboxCardList;exports.SessionTimeoutPopup=t.SessionTimeoutPopup;exports.SidePanelContext=t.SidePanelContext;exports.SidePanelProvider=t.SidePanelProvider;exports.SignIn=t.SignIn;exports.SomethingWrongPage=t.SomethingWrongPage;exports.Space=t.Space;exports.SpendManagementListLoading=t.SpendManagementListLoading;exports.SpendManagementListViewPage=t.SpendManagementListViewPage;exports.StatementParseInfo=t.StatementParseInfo;exports.StatementProcessingPage=t.StatementProcessingPage;exports.StatementsPage=t.StatementsPage;exports.StyledCapsule=t.StyledCapsule;exports.SubscriptionDetailPage=t.SubscriptionDetailPage;exports.SubscriptionSummaryPage=t.SubscriptionSummaryPage;exports.SyntheticAiCfoAnswerView=t.SyntheticAiCfoAnswerView;exports.THREAD_RESOLVED_NOTIFICATION_KIND=t.THREAD_RESOLVED_NOTIFICATION_KIND;exports.THREAD_UNRESOLVED_NOTIFICATION_KIND=t.THREAD_UNRESOLVED_NOTIFICATION_KIND;exports.TaskDetailPage=t.TaskDetailPage;exports.TaskManagementPage=t.TaskManagementPage;exports.TenantsDropDown=t.TenantsDropDown;exports.TextStyle=t.TextStyle;exports.ToolkitProvider=t.ToolkitProvider;exports.TopExDetailPage=t.TopExDetailPage;exports.TransactionActivityLogPage=t.TransactionActivityLogPage;exports.TransactionActivityLogPanel=t.TransactionActivityLogPanel;exports.TransactionDetailPage=t.TransactionDetailPage;exports.TransactionDetailSkeleton=t.TransactionDetailSkeleton;exports.TransactionListBig=t.TransactionListBig;exports.TransactionListComments=t.TransactionListComments;exports.TransactionListPage=t.TransactionListPage;exports.TransactionPanelInternalContext=t.TransactionPanelInternalContext;exports.TransactionSidePanelLayout=t.TransactionSidePanelLayout;exports.TransactionVendorDetailPage=t.TransactionVendorDetailPage;exports.TransferDrawerPage=t.TransferDrawerPage;exports.TreasuryOverviewPage=t.TreasuryOverviewPage;exports.TreasuryPromoPage=t.TreasuryPromoPage;exports.TreasurySetUpPage=t.TreasurySetUpPage;exports.TreasuryStatementsPage=t.TreasuryStatementsPage;exports.TreasuryTaxLetterPage=t.TreasuryTaxLetterPage;exports.TreasuryTransferOrReviewPage=t.TreasuryTransferOrReviewPage;exports.TrendChart=t.TrendChart;exports.UncategorizedAccountsMappingPage=t.UncategorizedAccountsMappingPage;exports.UnitIntegrationPage=t.UnitIntegrationPage;exports.VENDOR_CHIP_ID_PREFIX=t.VENDOR_CHIP_ID_PREFIX;exports.Vendor2FAPopup=t.Vendor2FAPopup;exports.VendorACHDetailsPage=t.VendorACHDetailsPage;exports.VendorAccruedSchedulesPage=t.VendorAccruedSchedulesPage;exports.VendorDetailPage=t.VendorDetailPage;exports.VendorDomesticWireDetailsPage=t.VendorDomesticWireDetailsPage;exports.VendorFiling1099DetailsEditablePage=t.VendorFiling1099DetailsEditablePage;exports.VendorFiling1099EditableFormSkeleton=t.VendorFiling1099EditableFormSkeleton;exports.VendorFiling1099ListPage=t.VendorFiling1099ListPage;exports.VendorFirstReviewPage=t.VendorFirstReviewPage;exports.VendorInternationalSwiftBasedDetailsPage=t.VendorInternationalSwiftBasedDetailsPage;exports.VendorInternationalWireDetailsPage=t.VendorInternationalWireDetailsPage;exports.VendorListPage=t.VendorListPage;exports.VendorSchedulesPage=t.VendorSchedulesPage;exports.VerificationFrame=t.VerificationFrame;exports.VerifyDevice=t.VerifyDevice;exports.VerifyUnlockFinancialStackPage=t.VerifyUnlockFinancialStackPage;exports.WebV2MicroService=t.WebV2MicroService;exports.WebV2MicroServiceProvider=t.WebV2MicroServiceProvider;exports.WelcomeAnimation=t.WelcomeAnimation;exports.WindowSizeProvider=t.WindowSizeProvider;exports.ZeniAccountDetailLoading=t.ZeniAccountDetailLoading;exports.ZeniAccountDetailNavBarTitleShimmer=t.ZeniAccountDetailNavBarTitleShimmer;exports.ZeniAccountDetailPage=t.ZeniAccountDetailPage;exports.ZeniAccountListLoading=t.ZeniAccountListLoading;exports.ZeniAccountListViewPage=t.ZeniAccountListViewPage;exports.ZeniAccountPromoPage=t.ZeniAccountPromoPage;exports.ZeniAccountSetUpPage=t.ZeniAccountSetUpPage;exports.ZeniText=t.ZeniText;exports.ZeniThemeProvider=t.ZeniThemeProvider;exports.alignToJustify=t.alignToJustify;exports.amountToString=t.amountToString;exports.amountValueToString=t.amountValueToString;exports.appLocale=t.appLocale;exports.applyExtractedPolicyRulesToFormValues=t.applyExtractedPolicyRulesToFormValues;exports.buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm=t.buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm;exports.buildCardPolicyFormValuesFromRequest=t.buildCardPolicyFormValuesFromRequest;exports.buildCreateCardPolicyTemplateRequest=t.buildCreateCardPolicyTemplateRequest;exports.buildCreateCardPolicyTemplateRequestFromInteractiveForm=t.buildCreateCardPolicyTemplateRequestFromInteractiveForm;exports.buildMccCategoryChipId=t.buildMccCategoryChipId;exports.buildStickyKeySet=t.buildStickyKeySet;exports.buildVendorChipId=t.buildVendorChipId;exports.buildVoidInvoiceSubmitBody=t.buildVoidInvoiceSubmitBody;exports.cellVerticalAlignToFlexAlign=t.cellVerticalAlignToFlexAlign;exports.clearAutoLogoutContext=t.clearAutoLogoutContext;exports.clickableRowStyles=t.clickableRowStyles;exports.computeStatementProcessingStepsFromElapsedTime=t.computeStatementProcessingStepsFromElapsedTime;exports.computeStickyLeftOffsets=t.computeStickyLeftOffsets;exports.darkColors=t.darkColors;exports.darkTheme=t.darkTheme;exports.dashboardCardDimension=t.designDimension;exports.defaultCardPolicyFormValues=t.defaultCardPolicyFormValues;exports.formatReconAccountDisplayName=t.formatReconAccountDisplayName;exports.getAlpha2=t.getAlpha2;exports.getAlpha3=t.getAlpha3;exports.getColorForALabel=t.getColorForALabel;exports.getCountries=t.getCountries;exports.getCustomerDataFromAutoComplete=t.getCustomerDataFromAutoComplete;exports.getFullName=t.getFullName;exports.getInitialOpenThreadRequestFromSearch=t.getInitialOpenThreadRequestFromSearch;exports.getRecipientTotalAmount=t.getRecipientTotalAmount;exports.getReconAccountDisplayName=t.getReconAccountDisplayName;exports.getShowNegativeAmountInParenthesisDefaultValue=t.getShowNegativeAmountInParenthesisDefaultValue;exports.getShowNegativeAmountInParenthesisForPercentDefaultValue=t.getShowNegativeAmountInParenthesisForPercentDefaultValue;exports.getStableTransactionId=t.getStableTransactionId;exports.getStatementParseTransactionCount=t.getStatementParseTransactionCount;exports.invoicingMenuList=t.invoicingMenuList;exports.isBackdatedInvoiceDate=t.isBackdatedInvoiceDate;exports.isCloseManagementMenu=t.isCloseManagementMenu;exports.isClosedCardStatus=t.isClosedCardStatus;exports.isCollaborationEntityType=t.isCollaborationEntityType;exports.isCommentNotificationKind=t.isCommentNotificationKind;exports.isMobileOrTabletView=t.isMobileOrTabletView;exports.isMobilePhoneScreen=t.isMobilePhoneScreen;exports.lightColors=t.lightColors;exports.lightTheme=t.lightTheme;exports.menuList=t.menuList;exports.mergeColumnDeclarativeWithRenderers=t.mergeColumnDeclarativeWithRenderers;exports.mergeLayoutDefaults=t.mergeLayoutDefaults;exports.percentValueToString=t.percentValueToString;exports.resolveBackgroundStatementProcessingCompletedSteps=t.resolveBackgroundStatementProcessingCompletedSteps;exports.resolveColumnWidth=t.resolveColumnWidth;exports.roundAmountIfNeeded=t.roundAmountIfNeeded;exports.roundOffNumberToTwoDecimal=t.roundOffNumberToTwoDecimal;exports.setAutoLogoutContext=t.setAutoLogoutContext;exports.setShowNegativeAmountInParenthesisDefaultValue=t.setShowNegativeAmountInParenthesisDefaultValue;exports.setShowNegativeAmountInParenthesisForPercentDefaultValue=t.setShowNegativeAmountInParenthesisForPercentDefaultValue;exports.settingMenuList=t.settingMenuList;exports.shouldDefaultAdjustmentCreditNote=t.shouldDefaultAdjustmentCreditNote;exports.sp=t.sp;exports.textAlignForCell=t.textAlignForCell;exports.textStyles=t.textStyles;exports.toInstitutionLogoDataUri=t.toInstitutionLogoDataUri;exports.toInvoicingMenuOptionType=t.toInvoicingMenuOptionType;exports.toInvoicingMenuOptionTypeStrict=t.toInvoicingMenuOptionTypeStrict;exports.toMccCategoryChipFieldValue=t.toMccCategoryChipFieldValue;exports.toMenuOptionType=t.toMenuOptionType;exports.toSettingsMenuOptionTypeStrict=t.toSettingsMenuOptionTypeStrict;exports.toSupportedLocaleStrict=t.toSupportedLocaleStrict;exports.toVendorChipFieldValue=t.toVendorChipFieldValue;exports.trackTreasuryTransferAnalytics=t.trackTreasuryTransferAnalytics;exports.uploadAttachmentReceipts=t.uploadAttachmentReceipts;exports.useApprovalRulesV3Config=t.useApprovalRulesV3Config;exports.useBackNavigation=t.useBackNavigation;exports.useCollaborationInfoContext=t.useCollaborationInfoContext;exports.useCommentsDrawer=t.useCommentsDrawer;exports.useDropdownPortal=t.useDropdownPortal;exports.useExpenseAutomationEnabledForUser=t.useExpenseAutomationEnabledForUser;exports.useGlobalInfoContext=t.useGlobalInfoContext;exports.useLockBodyScroll=t.useLockBodyScroll;exports.usePanelInternal=t.usePanelInternal;exports.usePrevious=t.usePrevious;exports.useQuickViewMode=t.useQuickViewMode;exports.useRegisterBackHandler=t.useRegisterBackHandler;exports.useRequestCloseAllCommentDrawers=t.useRequestCloseAllCommentDrawers;exports.useSchedulePanelInternal=t.useSchedulePanelInternal;exports.useSessionAutoLogoutConfig=t.useSessionAutoLogoutConfig;exports.useSidePanelContext=t.useSidePanelContext;exports.useToolkitContext=t.useToolkitContext;exports.useTransactionPanelInternal=t.useTransactionPanelInternal;exports.useWindowSizeContext=t.useWindowSizeContext;exports.useZeniCardsVisibilityConfig=t.useZeniCardsVisibilityConfig;exports.useZeniFeatureContext=t.useZeniFeatureContext;exports.useZeniThemeContext=t.useZeniThemeContext;exports.waitFor=t.waitFor;exports.useZeniTheme=o.useTheme;exports.zeniStyled=o.styled;exports.zeniEmotionStyled=s;Object.defineProperty(exports,"buildInvoicingEntityPath",{enumerable:!0,get:()=>ee.buildInvoicingEntityPath});Object.defineProperty(exports,"isInvoicingEntityLinkable",{enumerable:!0,get:()=>ee.isInvoicingEntityLinkable});exports.AiAccountantDetailDrawer=Dy;exports.AiAccountantPage=i0;exports.AuditReportDrawerPage=Rb;exports.COCKPIT_TAB_OPTIONS=it;exports.COCKPIT_TAB_OPTIONS_WITH_CREDIT_AGENT=tl;exports.CockpitNavBar=Pl;exports.CreditAgentPage=A$;exports.HealthMonitorDetailDrawer=gx;exports.HealthMonitorPage=Gh;exports.ManagementPage=Pu;exports.MonthEndReportHistoricDataPage=nj;exports.MonthEndReportPage=M3;exports.NavHeader=dt;exports.OnboardingCustomerPage=OC;exports.OnboardingPage=F2;exports.PortfolioPage=ky;exports.ReviewPage=l4;exports.SubscriptionAddPlanPage=PS;exports.SubscriptionPage=o1;exports.SubscriptionUpdatePlanPage=pS;exports.TaskManagerPage=Ju;exports.WarningsDrawerPage=_b;exports.toCockpitOptionType=Rt;exports.toCockpitOptionTypeStrict=Il;
|