@zeniai/web-components 4.3.60-betaAK2 → 4.3.61
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-rD7JTrsx.js → SessionTimeoutPopup-BTgODld2.js} +85164 -84761
- package/dist/{SessionTimeoutPopup-D27PH8fA.cjs → SessionTimeoutPopup-BkaNPOAF.cjs} +15227 -15152
- package/dist/appLocale.d.ts +64 -18
- package/dist/cockpit.cjs.js +84 -84
- package/dist/cockpit.esm.js +223 -222
- package/dist/components/appDrawerContent/appDrawerContent.helpers.d.ts +5 -0
- package/dist/components/common/downloadReport/types/downloadReportOptions.d.ts +2 -0
- package/dist/components/common/downloadReport/types/downloadReportOptionsPayload.d.ts +2 -0
- package/dist/components/common/downloadReport/types/statementID.d.ts +2 -2
- package/dist/components/detail/dashboardReportPage/DashboardReportPage.d.ts +2 -1
- package/dist/components/detail/dashboardReportPage/DetailPageReportFilters.d.ts +2 -1
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualJournalEntryCard.d.ts +22 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEOneTimeAccrualDetailPage.d.ts +2 -8
- package/dist/components/invoicing/catalog/InvoicingCatalogPage.d.ts +1 -2
- package/dist/components/invoicing/catalog/catalogActionMenuItems.d.ts +0 -4
- package/dist/components/invoicing/catalogDetail/InvoicingCatalogItemDetailPage.d.ts +6 -2
- package/dist/components/invoicing/common/composeInvoicingEmailPreview.d.ts +20 -0
- package/dist/components/invoicing/customerDetail/InvoicingCustomerDetailPage.d.ts +14 -11
- package/dist/components/invoicing/customerDetail/InvoicingPaymentLinkEmailComposerDialog.d.ts +26 -0
- package/dist/components/invoicing/customerList/InvoicingCustomerListPage.d.ts +1 -1
- package/dist/components/invoicing/discountDetail/InvoicingDiscountDetailPage.d.ts +6 -2
- package/dist/components/invoicing/discountList/InvoicingDiscountListPage.d.ts +1 -2
- package/dist/components/invoicing/discountList/discountActionMenuItems.d.ts +0 -4
- package/dist/components/invoicing/dunningDetail/InvoicingDunningEmailComposerDialog.d.ts +4 -0
- package/dist/components/invoicing/invoiceDetail/InvoicingInvoiceDetailPage.d.ts +6 -1
- package/dist/components/invoicing/paymentList/paymentActionMenuItems.d.ts +2 -6
- package/dist/components/invoicing/paymentList/paymentListRowMenu.d.ts +1 -1
- package/dist/components/invoicing/subscriptionDetail/InvoicingSubscriptionDetailPage.d.ts +6 -2
- package/dist/components/invoicing/subscriptionList/InvoicingSubscriptionListPage.d.ts +1 -4
- package/dist/components/invoicing/subscriptionList/subscriptionActionMenuItems.d.ts +0 -4
- package/dist/components/invoicing/subscriptionList/subscriptionListRowMenu.d.ts +1 -1
- package/dist/components/reportTree/reportTreeTypes.d.ts +5 -0
- package/dist/components/reportTree/treeNode/pAndLReports/row/SectionRow.d.ts +7 -1
- package/dist/components/reportTree/treeNode/pAndLReports/treeNodeMappers/mapSectionToTreeNode.d.ts +6 -3
- package/dist/components/reports/ReportsPage.d.ts +10 -2
- package/dist/components/reports/cashFlow/mapCashFlowClassReportToTreeNodes.d.ts +4 -0
- package/dist/components/reports/cashFlow/mapCashFlowGroupedReportToTreeNodes.d.ts +20 -0
- package/dist/components/reports/cashFlow/mapCashFlowProjectReportToTreeNodes.d.ts +4 -0
- package/dist/components/reports/reportTypes.d.ts +2 -2
- package/dist/components/spendManagement/zeniAccounts/expressPay/sections/RecipientDetailsSection.d.ts +1 -1
- package/dist/components/transactionDetail/items/transactionLineTable/listRow/TransactionLineTableListRow.d.ts +1 -1
- package/dist/components/transactionDetail/items/transactionLineTable/transactionLineTableTypes.d.ts +9 -0
- package/dist/context/featureProvider/DynamicConfigNameConstants.d.ts +2 -0
- package/dist/context/featureProvider/useMeetingLinks.d.ts +16 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.esm.js +285 -284
- package/dist/strings/strings.d.ts +64 -18
- package/package.json +19 -19
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualSequenceSection.d.ts +0 -22
- package/dist/components/invoicing/catalogDetail/catalogProductActionMenuItems.test.d.ts +0 -1
- package/dist/components/invoicing/customerDetail/InvoicingPaymentLinkEmailPreview.d.ts +0 -15
- package/dist/components/invoicing/discountList/discountActionMenuItems.test.d.ts +0 -1
- package/dist/components/invoicing/invoiceDetail/invoicingVoidInvoiceHelpers.d.ts +0 -4
- package/dist/components/invoicing/invoiceDetail/invoicingVoidInvoiceHelpers.test.d.ts +0 -1
- /package/dist/{components/invoicing/catalog/catalogActionMenuItems.test.d.ts → context/featureProvider/useMeetingLinks.test.d.ts} +0 -0
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-BkaNPOAF.cjs"),o=require("./vendor-.pnpm-BGlYY3q9.cjs"),p=require("react"),s=require("@emotion/styled"),ot=require("@liveblocks/react"),J=require("@zeniai/client-epic-state"),rr=require("@liveblocks/react-ui"),$e=require("@emotion/react"),Xo=require("react-dom"),It=require("@liveblocks/react-ui/primitives"),ma=require("@liveblocks/react/suspense");function Ul(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 ce=Ul(p),Hl=({inboxNotification:e,onNotificationClick:n})=>{const r=ot.useInboxNotificationThread(e.id),i=r.metadata.entityType.split("."),a=r.metadata.isGlobalComment&&i.length===2;return o.jsxRuntimeExports.jsx(Kl,{isClickable:a,isUnRead:e.readAt==null,onClick:()=>{n(r.metadata,r.id)},children:o.jsxRuntimeExports.jsx(rr.InboxNotification,{inboxNotification:e,kinds:{thread:c=>o.jsxRuntimeExports.jsx(rr.InboxNotification.Thread,{...c,showRoomName:!0})}})})},Kl=s.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
cursor: ${e=>e.isClickable?"pointer":"initial"};
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
justify-content: center;
|
|
122
122
|
align-items: center;
|
|
123
123
|
background-color: inherit;
|
|
124
|
-
`;function cc(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}}const{cockpit:dc,download:ar,common:{texts:{unsupportedFiletype:pc,cockpit:lr}}}=t.appLocale.getLocalizedStrings();function uc(e){const{tabs:n,filterByTabs:r,tabsFileType:i,timezone:a}=e.defaultOptions;return{tabsFileType:i,tabs:n,filterByTabs:r,timezone:a}}function mc(e){const n=uc(e);return xc(e.downloadParams.cockpitEndPoint,e.downloadParams.authParams,n)}async function xc(e,n,r){const i=`${e}?query=${encodeURIComponent(JSON.stringify(cc(r)))}`;try{if(r.tabsFileType==null)throw new Error(pc);const a=await t.fetchRequest({urlEndPoint:i,authParams:n,fileType:r.tabsFileType});if(a.ok){const c=t.getFileNameFromResponseHeaders(a.headers,dc.defaultFileName),l=await a.arrayBuffer();o.fileDownload(l,c)}else console.error(`${ar.errorMessages.fileDownloadError.replace("__feature__",lr)} ${a.statusText}`)}catch(a){console.error(`${ar.errorMessages.fileDownloadError.replace("__feature__",lr)} ${JSON.stringify(a)}`)}}const De=88,io=58,ao=1,lo=55,hc=10,gc=5,xt=["management","subscription","portfolio","onboarding","audit","healthMonitor","taskManager","aiAccountant"],Sc=[...xt,"creditAgent"],xa=[{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:"productVerticals",multiple:!0},{value:"companyGroupId"},{value:"taxStatusCode"},{value:"statusCode"},{value:"annualRecurringRevenue"},{value:"monthlyRecurringRevenue"},{value:"customerSatisfaction",type:"rating"},{value:"zeniSatisfaction",type:"rating"}],ha=[{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"}],ga=[{value:"netBurnOrIncome"},{value:"cashPosition"},{value:"expenses"},{value:"income"},{value:"runway",type:"runway"}],Sa=[{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"}],yc=[{label:"< 200K",value:"0<->200000"},{label:"75K to 100K",value:"75000<->100000"},{label:"25K to 75K",value:"25000<->75000"},{label:"< 25K",value:"0<->25000"}],Us=[{label:"< 10K",value:"0<->10000"},{label:"5K to 8K",value:"5000<->8000"},{label:"2K to 5K",value:"2000<->5000"},{label:"< 2K",value:"0<->2000"}],fc=[{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"}],Cc=[{label:"< 100K",value:"0<->100000"},{label:"100K to 500K",value:"100000<->500000"},{label:"500K to 1M",value:"500000<->1000000"},{label:"> 1M",value:"1000000<->10000000000"}],jc=[{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"}],bc=[{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"}],Rc=[{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"}],$c=[{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"}],Ec=[{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}],vc=[{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"}],wc=[{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"}],kc=[{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"}],Tc=[{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"5",value:"5"}],Ic=[{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"}],ya=[1,2,3,4,5,6,7,8,9,10],fa=[1,2,3,4,5],{cockpit:{titles:Pc},common:{settings:{integrations:{connectorTooltips:{accountantSectionLabel:Lc}},productNameByType:{charge_cards:Ac}}}}=t.appLocale.getLocalizedStrings(),Dc=e=>{switch(e){case"management":case"subscription":case"portfolio":case"onboarding":case"audit":return e;case"aiAccountant":return Lc;case"creditAgent":return Ac;default:return Pc.healthMonitor}},Oc=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"}},Nc=[{value:"enrollmentStatus",multiple:!0}],Ca=[{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"}],Mc=({downloadCockpitOptions:e})=>o.jsxRuntimeExports.jsx(t.SimpleDownloadMenuButton,{downloadMenuItems:e.downloadMenu.simpleMenuItems,onDownloadClick:e.downloadMenu.onDownloadClick});function zc(e){const[n,r]=p.useState(!1),{analytics:i,updateDownloadStateHandler:a,downloadState:c,currentCockpitTab:l}=e;return p.useEffect(()=>{async function d(){await mc({...e}),a("Completed"),i.trackDownload(Oc(l),"months","excel",!1)}n&&e.downloadState!=="In-Progress"&&(r(!1),a("In-Progress"),d())},[c,n,a,i,e,l]),o.jsxRuntimeExports.jsx(Fc,{"data-testid":t.generateDataTestId("cockpit-download-button"),children:o.jsxRuntimeExports.jsx(Mc,{downloadCockpitOptions:{type:"simple_menu",downloadMenu:{simpleMenuItems:[{type:"excel",isDownloading:e.downloadState==="In-Progress"}],onDownloadClick:async d=>{if(d==="excel"){if(e.downloadState==="In-Progress")return;r(!0)}}}}})})}const Fc=s.div``,{common:{texts:{cockpit:
|
|
124
|
+
`;function cc(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}}const{cockpit:dc,download:ar,common:{texts:{unsupportedFiletype:pc,cockpit:lr}}}=t.appLocale.getLocalizedStrings();function uc(e){const{tabs:n,filterByTabs:r,tabsFileType:i,timezone:a}=e.defaultOptions;return{tabsFileType:i,tabs:n,filterByTabs:r,timezone:a}}function mc(e){const n=uc(e);return xc(e.downloadParams.cockpitEndPoint,e.downloadParams.authParams,n)}async function xc(e,n,r){const i=`${e}?query=${encodeURIComponent(JSON.stringify(cc(r)))}`;try{if(r.tabsFileType==null)throw new Error(pc);const a=await t.fetchRequest({urlEndPoint:i,authParams:n,fileType:r.tabsFileType});if(a.ok){const c=t.getFileNameFromResponseHeaders(a.headers,dc.defaultFileName),l=await a.arrayBuffer();o.fileDownload(l,c)}else console.error(`${ar.errorMessages.fileDownloadError.replace("__feature__",lr)} ${a.statusText}`)}catch(a){console.error(`${ar.errorMessages.fileDownloadError.replace("__feature__",lr)} ${JSON.stringify(a)}`)}}const De=88,io=58,ao=1,lo=55,hc=10,gc=5,xt=["management","subscription","portfolio","onboarding","audit","healthMonitor","taskManager","aiAccountant"],Sc=[...xt,"creditAgent"],xa=[{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:"productVerticals",multiple:!0},{value:"companyGroupId"},{value:"taxStatusCode"},{value:"statusCode"},{value:"annualRecurringRevenue"},{value:"monthlyRecurringRevenue"},{value:"customerSatisfaction",type:"rating"},{value:"zeniSatisfaction",type:"rating"}],ha=[{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"}],ga=[{value:"netBurnOrIncome"},{value:"cashPosition"},{value:"expenses"},{value:"income"},{value:"runway",type:"runway"}],Sa=[{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"}],yc=[{label:"< 200K",value:"0<->200000"},{label:"75K to 100K",value:"75000<->100000"},{label:"25K to 75K",value:"25000<->75000"},{label:"< 25K",value:"0<->25000"}],Us=[{label:"< 10K",value:"0<->10000"},{label:"5K to 8K",value:"5000<->8000"},{label:"2K to 5K",value:"2000<->5000"},{label:"< 2K",value:"0<->2000"}],fc=[{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"}],Cc=[{label:"< 100K",value:"0<->100000"},{label:"100K to 500K",value:"100000<->500000"},{label:"500K to 1M",value:"500000<->1000000"},{label:"> 1M",value:"1000000<->10000000000"}],jc=[{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"}],bc=[{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"}],Rc=[{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"}],$c=[{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"}],Ec=[{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}],vc=[{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"}],wc=[{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"}],kc=[{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"}],Tc=[{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"5",value:"5"}],Ic=[{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"}],ya=[1,2,3,4,5,6,7,8,9,10],fa=[1,2,3,4,5],{cockpit:{titles:Pc},common:{settings:{integrations:{connectorTooltips:{accountantSectionLabel:Lc}},productNameByType:{charge_cards:Ac}}}}=t.appLocale.getLocalizedStrings(),Dc=e=>{switch(e){case"management":case"subscription":case"portfolio":case"onboarding":case"audit":return e;case"aiAccountant":return Lc;case"creditAgent":return Ac;default:return Pc.healthMonitor}},Oc=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"}},Nc=[{value:"enrollmentStatus",multiple:!0}],Ca=[{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"}],Mc=({downloadCockpitOptions:e})=>o.jsxRuntimeExports.jsx(t.SimpleDownloadMenuButton,{downloadMenuItems:e.downloadMenu.simpleMenuItems,onDownloadClick:e.downloadMenu.onDownloadClick});function zc(e){const[n,r]=p.useState(!1),{analytics:i,updateDownloadStateHandler:a,downloadState:c,currentCockpitTab:l}=e;return p.useEffect(()=>{async function d(){await mc({...e}),a("Completed"),i.trackDownload(Oc(l),"months","excel",!1)}n&&e.downloadState!=="In-Progress"&&(r(!1),a("In-Progress"),d())},[c,n,a,i,e,l]),o.jsxRuntimeExports.jsx(Fc,{"data-testid":t.generateDataTestId("cockpit-download-button"),children:o.jsxRuntimeExports.jsx(Mc,{downloadCockpitOptions:{type:"simple_menu",downloadMenu:{simpleMenuItems:[{type:"excel",isDownloading:e.downloadState==="In-Progress"}],onDownloadClick:async d=>{if(d==="excel"){if(e.downloadState==="In-Progress")return;r(!0)}}}}})})}const Fc=s.div``,{common:{texts:{cockpit:_c,newCustomer:cr,comments:Bc}}}=t.appLocale.getLocalizedStrings(),dr=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
|
-
`,Zc=s.div``;function Xc({defaultOptions:e,downloadState:n,downloadParams:r,signedInUser:i,cockpitHeader:a,analytics:c,currentTab:l,updateDownloadStateHandler:d,onZeniLogoClick:u,onLogOutClick:m,onThreadClick:x,onNotificationClick:f,onNewCustomerClick:h}){const S=t.useWindowSizeContext(),[j,g]=p.useState(!1),[b,C]=p.useState(!1),{inboxNotifications:y,isLoading:E,isFetchingMore:v,hasFetchedAll:$,fetchMore:I}=ot.useInboxNotifications(),{threads:w,isLoading:T}=t.useFilteredThreads({application:"cockpit",isGlobalComment:!0},"both",!0),
|
|
193
|
+
`,Zc=s.div``;function Xc({defaultOptions:e,downloadState:n,downloadParams:r,signedInUser:i,cockpitHeader:a,analytics:c,currentTab:l,updateDownloadStateHandler:d,onZeniLogoClick:u,onLogOutClick:m,onThreadClick:x,onNotificationClick:f,onNewCustomerClick:h}){const S=t.useWindowSizeContext(),[j,g]=p.useState(!1),[b,C]=p.useState(!1),{inboxNotifications:y,isLoading:E,isFetchingMore:v,hasFetchedAll:$,fetchMore:I}=ot.useInboxNotifications(),{threads:w,isLoading:T}=t.useFilteredThreads({application:"cockpit",isGlobalComment:!0},"both",!0),_=p.useMemo(()=>w.filter(k=>k.resolved===!1),[w]).length,{setOpenThread:H,setRequestToOpenThread:U,openThread:K}=p.useContext(t.ThreadsContext);p.useEffect(()=>{const k=setTimeout(()=>I?.(),0);return()=>clearTimeout(k)});const W=E||v===!0||$!==!0,R=y?.filter(k=>k.readAt==null&&k.roomId?.includes("cockpit")===!0&&k.kind==="thread").length,A=Dc(l),B=p.useCallback((k,N)=>{const{companyId:V,entityType:ee}=k;K===N?H(null):(g(!1),U({threadId:N,companyId:V,entityType:ee}))},[K,H,U]),P=p.useCallback((k,N)=>{const{companyId:V,entityType:ee}=k;K===N?H(null):(C(!1),U({threadId:N,companyId:V,entityType:ee}))},[K,H,U]);return S!=="small"?o.jsxRuntimeExports.jsxs(dr,{children:[o.jsxRuntimeExports.jsxs(pr,{children:[o.jsxRuntimeExports.jsx(Hc,{children:o.jsxRuntimeExports.jsx(Uc,{"data-testid":t.generateDataTestId("zeni-logo-cockpit-nav-bar"),onClick:u})}),o.jsxRuntimeExports.jsx(Wc,{children:a??_c}),o.jsxRuntimeExports.jsxs(Kc,{children:[j?null:o.jsxRuntimeExports.jsxs(ur,{isDisabled:T,onClick:T?()=>null:()=>g(!0),children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:T?void 0:_,isLoading:T,style:{left:"12px"}}),o.jsxRuntimeExports.jsx(Gc,{})]}),o.jsxRuntimeExports.jsxs(ur,{isDisabled:W,onClick:W?()=>null:()=>C(!0),children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:R,isLoading:W,style:{left:"12px"}}),o.jsxRuntimeExports.jsx(Yc,{})]}),o.jsxRuntimeExports.jsx(zc,{defaultOptions:e,downloadParams:r,downloadState:n,analytics:c,currentCockpitTab:A,updateDownloadStateHandler:d}),o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:cr,onClick:h}),o.jsxRuntimeExports.jsx(Vc,{children:o.jsxRuntimeExports.jsx(t.LogoutButton,{signedInUser:i,pageName:"Cockpit",onLogOutClick:m})})]})]}),o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:j,filter:{application:"cockpit",isGlobalComment:!0},autoExpand:!0,autoFocus:!1,drawerTitle:Bc,onCloseAllThreadsDrawer:()=>g(!1),onThreadClick:(k,N)=>{x(k,N,B)},style:{cursor:"pointer"},showReactions:!0,showActions:!0,allowExpand:!0,threads:w,isLoading:T,allowComposer:!1,textOverrides:{},withRoomProvider:!0}),o.jsxRuntimeExports.jsx(Zl,{application:"cockpit",isDrawerOpen:b,onNotificationClick:(k,N)=>{f(k,N,P)},onCloseAllInboxNotificationsDrawer:()=>C(!1)})]}):o.jsxRuntimeExports.jsx(dr,{className:"mobileHeader",children:o.jsxRuntimeExports.jsxs(pr,{className:"mobileTitle",children:[o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:cr,onClick:h}),o.jsxRuntimeExports.jsx(Zc,{children:o.jsxRuntimeExports.jsx(t.LogoutButton,{signedInUser:i,pageName:"Cockpit",onLogOutClick:m})})]})})}const Hs=["management","subscription","portfolio","onboarding","audit","healthMonitor","taskManager","aiAccountant","creditAgent"],Bt=e=>J.stringToUnion(e,Hs),Qc=e=>J.stringToUnionStrict(e,Hs),qc=(e,n)=>e in n,{cockpit:{filters:{filterCategories:Ks}},common:{oauthConsent:{company:Jc},texts:{controller:Gs,csManager:ja,preparer:ed,reviewer:td,apAnalyst:od,taxLead:nd,plans:ba,group:Ra,taxStatus:sd,arr:rd,mrr:Ys,productVerticals:$a,cashBalance:id,netIncome:ad,expensesOpexCogs:ld,revenues:cd,runway:Ea,upgradeStatus:dd,addons:pd,planLowerLimit:ud,planHigherLimit:md,status:xd,priority:hd,assignee:gd,tag:Sd,dueDate:yd,createdAt:fd,churnProbability:Cd,nps:jd,csat:bd,lastReportSent:Rd,renewalDate:$d,subscriptionDate:Ed,externalServicesExposure:vd,lastUpdated:wd}}}=t.appLocale.getLocalizedStrings(),va=e=>{switch(e){case"management":return xa;case"subscription":return ha;case"portfolio":return ga;case"healthMonitor":return Sa;case"aiAccountant":return Nc;case"taskManager":return Ca;default:return[]}},kd={...Ks.management,controllerUserIds:Gs,customerSuccessManagerUserIds:ja,preparerUserIds:ed,reviewerUserIds:td,apAnalystUserIds:od,taxLeadUserIds:nd,plans:ba,companyGroupId:Ra,taxStatusCode:sd,annualRecurringRevenue:rd,monthlyRecurringRevenue:Ys,productVerticals:$a},Td={cashPosition:id,netBurnOrIncome:ad,expenses:ld,income:cd,runway:Ea},Id={...Ks.subscription,controllerUserIds:Gs,recommendedActionCode:dd,monthlyRecurringRevenue:Ys,subscriptionPlans:ba,subscriptionAddOns:pd,slabLowerLimit:ud,slabUpperLimit:md},Pd={company_id:Jc,status:xd,priority:hd,assignees:gd,tag:Sd,dueDate:yd,creationDate:fd},Ld={controller:Gs,customerSuccessManager:ja,churnProbabilityPercentage:Cd,runway:Ea,netPromoterScore:jd,customerSatisfactionScore:bd,lastReportSent:Rd,subscriptionRenewalDate:$d,subscriptionStartDate:Ed,verticalProductServices:$a,monthlyRecurringRevenue:Ys,companyGroupId:Ra,externalProductServiceExposure:vd,companyEngagementMetricsUpdatedAt:wd},As=(e,n)=>{switch(e){case"management":return kd[n];case"portfolio":return Td[n];case"subscription":return Id[n];case"aiAccountant":return Ks.aiAccountant[n];case"taskManager":return Pd[n];default:return Ld[n]}},wa={productEnable:"product_enable_access",realmIdManagement:"realm_id_management_access"};function ka(e){const{useDynamicConfig:n}=t.useZeniFeatureContext(),{configValue:r}=n(t.DynamicConfigNames.cockpitControlsConfig),i=t.useGlobalInfoContext().loggedInUser?.userEmail;if(r==null||i==null)return!1;const a=r[e],c=i.trim().toLowerCase();return Array.isArray(a)&&a.some(l=>typeof l=="string"&&l.trim().toLowerCase()===c)}function Ta(){return ka(wa.productEnable)}function Ad(){return ka(wa.realmIdManagement)}const{common:{texts:{category:Dd}}}=t.appLocale.getLocalizedStrings(),Od=s.div`
|
|
194
194
|
display: flex;
|
|
195
195
|
justify-content: space-between;
|
|
196
196
|
align-items: center;
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
color: ${e=>e.theme.colors.primary};
|
|
199
199
|
width: ${t.Space.sp4};
|
|
200
200
|
height: ${t.Space.sp4};
|
|
201
|
-
`,mr=({onChange:e,value:n,categoryIndex:r,defaultMenuIsOpen:i=!1,selectedCockpitOption:a})=>{const c=o.useTheme(),l=p.useRef(null),d=t.getDropdownStyles(c),u=Ta(),m=va(a).filter(S=>S.value!=="productVerticals"||u),x=m.find(S=>S.value===n);p.useEffect(()=>{const S=setTimeout(()=>{l.current!=null&&i&&l.current.focus()},300);return()=>{clearTimeout(S)}},[i]);const f=S=>{const j=As(a,S.data.value);return o.jsxRuntimeExports.jsx(o.components.SingleValue,{...S,children:o.jsxRuntimeExports.jsx(t.StandardRegularSp,{children:j})})},h=S=>{const{isSelected:j}=S,g=As(a,S.data.value);return o.jsxRuntimeExports.jsx(o.components.Option,{...S,children:o.jsxRuntimeExports.jsxs(Od,{"data-testid":t.generateDataTestId("cockpit-filters-category-option",typeof S.data.value=="string"?S.data.value:S.data.value?.code??S.data.value?.id??S.label),children:[o.jsxRuntimeExports.jsx(t.StandardRegular,{children:g}),j&&o.jsxRuntimeExports.jsx(Nd,{})]})})};return o.jsxRuntimeExports.jsx(Md,{"data-testid":t.generateDataTestId("cockpit-filters-category-select"),children:o.jsxRuntimeExports.jsx(o.StateManagedSelect$1,{ref:l,isMulti:!1,value:x,onChange:S=>{e(S,r)},placeholder:Dd,options:m,styles:d,menuPosition:"fixed",openMenuOnFocus:!0,components:{Option:h,SingleValue:f}})})},Md=s.div``,{spendManagement:{filters:zd},common:{texts:{from:Fd,to:
|
|
201
|
+
`,mr=({onChange:e,value:n,categoryIndex:r,defaultMenuIsOpen:i=!1,selectedCockpitOption:a})=>{const c=o.useTheme(),l=p.useRef(null),d=t.getDropdownStyles(c),u=Ta(),m=va(a).filter(S=>S.value!=="productVerticals"||u),x=m.find(S=>S.value===n);p.useEffect(()=>{const S=setTimeout(()=>{l.current!=null&&i&&l.current.focus()},300);return()=>{clearTimeout(S)}},[i]);const f=S=>{const j=As(a,S.data.value);return o.jsxRuntimeExports.jsx(o.components.SingleValue,{...S,children:o.jsxRuntimeExports.jsx(t.StandardRegularSp,{children:j})})},h=S=>{const{isSelected:j}=S,g=As(a,S.data.value);return o.jsxRuntimeExports.jsx(o.components.Option,{...S,children:o.jsxRuntimeExports.jsxs(Od,{"data-testid":t.generateDataTestId("cockpit-filters-category-option",typeof S.data.value=="string"?S.data.value:S.data.value?.code??S.data.value?.id??S.label),children:[o.jsxRuntimeExports.jsx(t.StandardRegular,{children:g}),j&&o.jsxRuntimeExports.jsx(Nd,{})]})})};return o.jsxRuntimeExports.jsx(Md,{"data-testid":t.generateDataTestId("cockpit-filters-category-select"),children:o.jsxRuntimeExports.jsx(o.StateManagedSelect$1,{ref:l,isMulti:!1,value:x,onChange:S=>{e(S,r)},placeholder:Dd,options:m,styles:d,menuPosition:"fixed",openMenuOnFocus:!0,components:{Option:h,SingleValue:f}})})},Md=s.div``,{spendManagement:{filters:zd},common:{texts:{from:Fd,to:_d}}}=t.appLocale.getLocalizedStrings(),Bd=({selectedRanges:e,options:n,onNumericRangeChange:r})=>{const i=t.useWindowSizeContext(),a=o.useTheme(),c=e.start,l=e.end,[d,u]=p.useState(c),[m,x]=p.useState(l),[f,h]=p.useState(n);p.useEffect(()=>{d!=null&&m!=null&&(r({start:d,end:m}),d>m&&x(d)),d!=null?h(n.filter(g=>g>=d)):h(n)},[d,m]);const S=g=>{u(g)},j=g=>{x(g)};return o.jsxRuntimeExports.jsxs(Wd,{size:i,children:[o.jsxRuntimeExports.jsx(xr,{children:o.jsxRuntimeExports.jsx(t.SingleSelectNumeric,{onSelectedValueChanged:S,placeholder:Fd,defaultValue:{allOptions:n,selectedOption:d},hasError:!1,customStyleConfig:{input:()=>({input:{textAlign:"left"}}),control:()=>({backgroundColor:a.colors.background})}})}),o.jsxRuntimeExports.jsx(Vd,{children:zd.enDash}),o.jsxRuntimeExports.jsx(xr,{children:o.jsxRuntimeExports.jsx(t.SingleSelectNumeric,{onSelectedValueChanged:j,placeholder:_d,defaultValue:{allOptions:f,selectedOption:m},hasError:!1,customStyleConfig:{input:()=>({input:{textAlign:"left"}}),control:()=>({backgroundColor:a.colors.background})}})})]})},Wd=s.div`
|
|
202
202
|
display: flex;
|
|
203
203
|
align-items: center;
|
|
204
204
|
column-gap: ${t.Space.sp3};
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
`,np=s(t.StandardRegularSp)`
|
|
263
263
|
overflow: hidden;
|
|
264
264
|
text-overflow: ellipsis;
|
|
265
|
-
`,sp=({options:e,categoryIndex:n,value:r,categoryType:i,categoryLabel:a,valuesCombinationOperator:c,showAnyAll:l,onChange:d,onValuesCombinationOperatorChange:u})=>{const m=o.useTheme(),x=t.getMultiSelectDropdownStyles(m),f=r.map($=>e.find(I=>I.value===$)),h=($,I,w,T)=>i!=="user"?null:$==null?o.jsxRuntimeExports.jsx(t.EntityAvatarWithInitials,{firstName:I,lastName:w,index:T}):o.jsxRuntimeExports.jsx(Jd,{src:$.href,alt:Kd,onError:({currentTarget:z})=>{z.onerror=null,z.src=t.AvatarSVG},loading:"lazy"}),S=$=>i!=="rating"?null:Object.keys(Co).includes($)?o.jsxRuntimeExports.jsx(Tn,{iconName:Co[$].iconName,width:18,height:18,stopAnimation:!0,style:{margin:0}}):o.jsxRuntimeExports.jsx(Tn,{iconName:Zo[$].iconName,stopAnimation:!0,width:18,height:18,style:{margin:0}}),j=$=>i!=="runway"?null:o.jsxRuntimeExports.jsx(Gd,{color:$}),g=$=>{const I=e.findIndex(w=>w.value===$.data.value);return o.jsxRuntimeExports.jsx(o.components.MultiValueLabel,{...$,children:o.jsxRuntimeExports.jsxs(Xd,{children:[h($.data.photo,$.data.label.split(" ")[0],$.data.label.split(" ")[1]!=null?$.data.label.split(" ")[1]:"",I),S($.data.value),j($.data.iconColor),o.jsxRuntimeExports.jsx(np,{children:$.children})]})})},b=$=>o.jsxRuntimeExports.jsx(o.components.MultiValueRemove,{...$,children:o.jsxRuntimeExports.jsx(op,{})}),C=$=>{const{onMouseMove:I,onMouseOver:w,isSelected:T,...z}=$.innerProps,
|
|
265
|
+
`,sp=({options:e,categoryIndex:n,value:r,categoryType:i,categoryLabel:a,valuesCombinationOperator:c,showAnyAll:l,onChange:d,onValuesCombinationOperatorChange:u})=>{const m=o.useTheme(),x=t.getMultiSelectDropdownStyles(m),f=r.map($=>e.find(I=>I.value===$)),h=($,I,w,T)=>i!=="user"?null:$==null?o.jsxRuntimeExports.jsx(t.EntityAvatarWithInitials,{firstName:I,lastName:w,index:T}):o.jsxRuntimeExports.jsx(Jd,{src:$.href,alt:Kd,onError:({currentTarget:z})=>{z.onerror=null,z.src=t.AvatarSVG},loading:"lazy"}),S=$=>i!=="rating"?null:Object.keys(Co).includes($)?o.jsxRuntimeExports.jsx(Tn,{iconName:Co[$].iconName,width:18,height:18,stopAnimation:!0,style:{margin:0}}):o.jsxRuntimeExports.jsx(Tn,{iconName:Zo[$].iconName,stopAnimation:!0,width:18,height:18,style:{margin:0}}),j=$=>i!=="runway"?null:o.jsxRuntimeExports.jsx(Gd,{color:$}),g=$=>{const I=e.findIndex(w=>w.value===$.data.value);return o.jsxRuntimeExports.jsx(o.components.MultiValueLabel,{...$,children:o.jsxRuntimeExports.jsxs(Xd,{children:[h($.data.photo,$.data.label.split(" ")[0],$.data.label.split(" ")[1]!=null?$.data.label.split(" ")[1]:"",I),S($.data.value),j($.data.iconColor),o.jsxRuntimeExports.jsx(np,{children:$.children})]})})},b=$=>o.jsxRuntimeExports.jsx(o.components.MultiValueRemove,{...$,children:o.jsxRuntimeExports.jsx(op,{})}),C=$=>{const{onMouseMove:I,onMouseOver:w,isSelected:T,...z}=$.innerProps,_=e.findIndex(U=>U.value===$.data.value),H={...$,innerProps:z};return o.jsxRuntimeExports.jsx(o.components.Option,{...H,children:o.jsxRuntimeExports.jsxs(qd,{children:[o.jsxRuntimeExports.jsxs(Qd,{children:[h($.data.photo,$.data.label.split(" ")[0],$.data.label.split(" ")[1]!=null?$.data.label.split(" ")[1]:"",_),S($.data.value),j($.data.iconColor),o.jsxRuntimeExports.jsx(t.StandardRegular,{children:$.label})]}),$.isSelected&&o.jsxRuntimeExports.jsx(ep,{})]})})},y=($,I)=>i==="user"&&$.data.email!=null?$.data.label.toLowerCase().includes(I.toLowerCase())||$.data.email.toLowerCase().includes(I.toLowerCase()):$.data.label.toLowerCase().includes(I.toLowerCase()),E=l&&f.length>1,v=()=>{switch(i){case"dateRange":return o.jsxRuntimeExports.jsx(ip,{"data-testid":t.generateDataTestId("cockpit-filters-values-daterange"),children:o.jsxRuntimeExports.jsx(t.DateRangeFilterField,{onDateRangeChange:$=>{$.startDate!=null&&$.endDate!=null&&d([{label:$o.startDate,value:$.startDate},{label:$o.endDate,value:$.endDate}],n)},selectedDates:r})});case"dropdownRange":return o.jsxRuntimeExports.jsx(ap,{"data-testid":t.generateDataTestId("cockpit-filters-values-numrange"),children:o.jsxRuntimeExports.jsx(Bd,{options:e.map($=>parseInt($.label)),onNumericRangeChange:$=>{$.start!=null&&$.end!=null&&d([{label:$o.startDate,value:$.start.toString()},{label:$o.endDate,value:$.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(Zd,{"data-testid":t.generateDataTestId("cockpit-filters-values-select-container"),children:[f.length===0&&i==="user"?o.jsxRuntimeExports.jsx(tp,{}):null,o.jsxRuntimeExports.jsx(o.StateManagedSelect$1,{isMulti:!0,hideSelectedOptions:!1,value:f,onChange:$=>{Array.isArray($)===!0&&d($,n)},placeholder:`${$o.select} ${a}`,options:e,styles:x,menuPosition:"fixed",components:{Option:C,MultiValueLabel:g,MultiValueRemove:b},filterOption:y})]})}};return o.jsxRuntimeExports.jsxs(Yd,{categoryType:i,"data-testid":t.generateDataTestId("cockpit-filters-values-wrapper"),children:[v(),E&&o.jsxRuntimeExports.jsx(rp,{"data-testid":t.generateDataTestId("cockpit-filters-values-any-all"),children:o.jsxRuntimeExports.jsx(Ud,{categoryIndex:n,value:c,onChange:u})})]})},rp=s.div``,ip=s.div``,ap=s.div``,{common:{texts:{addFilter:lp,clearAll:cp,filterBy:gr}}}=t.appLocale.getLocalizedStrings(),Sr=s.div`
|
|
266
266
|
display: flex;
|
|
267
267
|
flex-direction: column;
|
|
268
268
|
row-gap: ${t.Space.sp4};
|
|
@@ -395,19 +395,19 @@
|
|
|
395
395
|
border-radius: ${t.Space.sp12};
|
|
396
396
|
margin-left: 2px;
|
|
397
397
|
}
|
|
398
|
-
`,{cockpit:{titles:Lp},common:{back:Ap,settings:{integrations:{connectorTooltips:{accountantSectionLabel:Dp}},productNameByType:{charge_cards:Op}},texts:{onboarding:Np,subscription:Mp}}}=t.appLocale.getLocalizedStrings(),jt=({headerData:e,headerActions:n})=>{const{filterData:r,showBackButton:i=!1,allTabOptions:a,selectedTabOption:c,companiesLoaded:l,tabCounterDetails:d}=e,{onNavigateBack:u,onTabChange:m,filterActions:x}=n,f=x?.onFilterTextChanged,h=x?.onFiltersChange,S=y=>{let E="";return Hs.forEach(v=>{v===y&&(E={...Lp,subscription:Mp,onboarding:Np,creditAgent:Op,aiAccountant:Dp}[y])}),E.length!=0,E};let j=-1;a?.forEach((y,E)=>{y===c&&(j=E)}),j===-1&&c!=null&&console.warn("Selected unsupported tab option");const g=p.useCallback(y=>{c&&f?.(c,y)},[f,c]),b=p.useCallback(y=>{h&&c&&h(c,y)},[h,c]),C=y=>{const E=a?.[y];E!=null&&m?.(E)};return o.jsxRuntimeExports.jsxs(Up,{"data-testid":t.generateDataTestId("cockpit-nav-header"),children:[o.jsxRuntimeExports.jsx(
|
|
398
|
+
`,{cockpit:{titles:Lp},common:{back:Ap,settings:{integrations:{connectorTooltips:{accountantSectionLabel:Dp}},productNameByType:{charge_cards:Op}},texts:{onboarding:Np,subscription:Mp}}}=t.appLocale.getLocalizedStrings(),jt=({headerData:e,headerActions:n})=>{const{filterData:r,showBackButton:i=!1,allTabOptions:a,selectedTabOption:c,companiesLoaded:l,tabCounterDetails:d}=e,{onNavigateBack:u,onTabChange:m,filterActions:x}=n,f=x?.onFilterTextChanged,h=x?.onFiltersChange,S=y=>{let E="";return Hs.forEach(v=>{v===y&&(E={...Lp,subscription:Mp,onboarding:Np,creditAgent:Op,aiAccountant:Dp}[y])}),E.length!=0,E};let j=-1;a?.forEach((y,E)=>{y===c&&(j=E)}),j===-1&&c!=null&&console.warn("Selected unsupported tab option");const g=p.useCallback(y=>{c&&f?.(c,y)},[f,c]),b=p.useCallback(y=>{h&&c&&h(c,y)},[h,c]),C=y=>{const E=a?.[y];E!=null&&m?.(E)};return o.jsxRuntimeExports.jsxs(Up,{"data-testid":t.generateDataTestId("cockpit-nav-header"),children:[o.jsxRuntimeExports.jsx(Bp,{"data-testid":t.generateDataTestId("cockpit-nav-header-back-button"),onClick:()=>{u&&u()},children:i===!0&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(_p,{}),o.jsxRuntimeExports.jsx(Fp,{children:Ap})]})}),a&&j!==-1&&a!=null&&m&&o.jsxRuntimeExports.jsx(Wp,{"data-testid":t.generateDataTestId("cockpit-nav-header-tab-switcher"),children:o.jsxRuntimeExports.jsx(kp,{tabCounterDetails:d,onTabChange:C,allTabOptions:a,selectedOption:j,getTitle:S})}),o.jsxRuntimeExports.jsx(zp,{"data-testid":t.generateDataTestId("cockpit-nav-header-search-wrapper"),children:r&&x&&o.jsxRuntimeExports.jsx(Vp,{"data-testid":t.generateDataTestId("cockpit-nav-header-filters"),children:o.jsxRuntimeExports.jsx(Rp,{selectedCockpitOption:c,filters:r.filters,disableFilters:r.disableFilters,getCategoryWiseOptions:x.getCategoryWiseOptions,onSearchTextChanged:g,onFiltersChange:b,companiesLoaded:l,filterText:r.filterText})})})]})},zp=s.div`
|
|
399
399
|
min-width: 250px;
|
|
400
400
|
display: flex;
|
|
401
401
|
justify-content: flex-end;
|
|
402
402
|
padding-bottom: 10px;
|
|
403
403
|
`,Fp=s.span`
|
|
404
404
|
transform: translateY(8px);
|
|
405
|
-
`,
|
|
405
|
+
`,_p=s(t.SvgArrowLeft)`
|
|
406
406
|
cursor: pointer;
|
|
407
407
|
height: ${t.Space.sp4};
|
|
408
408
|
width: ${t.Space.sp4};
|
|
409
409
|
transform: translateY(7px) scale3d(0.8, 0.8, 0.8);
|
|
410
|
-
`,
|
|
410
|
+
`,Bp=s(t.SmallRegular)`
|
|
411
411
|
padding: 0;
|
|
412
412
|
margin: auto 0;
|
|
413
413
|
color: ${e=>e.theme.colors.hero};
|
|
@@ -688,7 +688,7 @@
|
|
|
688
688
|
top: ${t.Space.sp3};
|
|
689
689
|
border-radius: ${t.Space.sp2};
|
|
690
690
|
}
|
|
691
|
-
`,{common:{texts:{parent:Mu,subsidiary:zu}}}=t.appLocale.getLocalizedStrings(),Fu=({companyId:e,companyName:n,isEnabled:r,parentSubsidiaryRelationship:i,onViewDetailsLinkClicked:a})=>{const[c,l]=p.useState(!1),d=p.useRef(null),u=()=>i.parentInfo?Mu:i.subsidiaryInfo?zu:null,m=h=>{l(h)},x=p.useCallback(()=>{l(!1)},[]),f=()=>o.jsxRuntimeExports.jsx(ku,{open:c,onClose:x,anchorEl:d.current,children:o.jsxRuntimeExports.jsx(Iu,{parentInfo:i.parentInfo,subsidiaryInfo:i.subsidiaryInfo,companyName:n,companyId:e,onViewDetailsLinkClicked:a})});return u()!=null?o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:x,children:o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(
|
|
691
|
+
`,{common:{texts:{parent:Mu,subsidiary:zu}}}=t.appLocale.getLocalizedStrings(),Fu=({companyId:e,companyName:n,isEnabled:r,parentSubsidiaryRelationship:i,onViewDetailsLinkClicked:a})=>{const[c,l]=p.useState(!1),d=p.useRef(null),u=()=>i.parentInfo?Mu:i.subsidiaryInfo?zu:null,m=h=>{l(h)},x=p.useCallback(()=>{l(!1)},[]),f=()=>o.jsxRuntimeExports.jsx(ku,{open:c,onClose:x,anchorEl:d.current,children:o.jsxRuntimeExports.jsx(Iu,{parentInfo:i.parentInfo,subsidiaryInfo:i.subsidiaryInfo,companyName:n,companyId:e,onViewDetailsLinkClicked:a})});return u()!=null?o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:x,children:o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(_u,{ref:d,onClick:h=>{h.stopPropagation(),m(!0)},className:"parent-subsidiary-tag",isExpanded:c,isEnabled:!!(r!=null&&r),"data-testid":t.generateDataTestId("cockpit-parent-subsidiary-tag"),children:u()}),f()]})}):null},_u=s(t.ExtraSmallRegularSp)`
|
|
692
692
|
height: 18px;
|
|
693
693
|
color: ${e=>e.theme.colors.hero};
|
|
694
694
|
border: ${e=>`1px solid ${e.theme.colors.grey3}`};
|
|
@@ -696,7 +696,7 @@
|
|
|
696
696
|
padding: 3px 6px;
|
|
697
697
|
cursor: pointer;
|
|
698
698
|
pointer-events: ${e=>e.isEnabled?"auto":"none"};
|
|
699
|
-
`,
|
|
699
|
+
`,Bu=s.div``,Wu=s.div`
|
|
700
700
|
height: ${t.Space.sp4};
|
|
701
701
|
display: flex;
|
|
702
702
|
align-items: center;
|
|
@@ -717,7 +717,7 @@
|
|
|
717
717
|
`,Yu=s(t.StandardRegular)`
|
|
718
718
|
display: flex;
|
|
719
719
|
align-items: center;
|
|
720
|
-
`,Zu=e=>{const{isSelected:n}=e;return o.jsxRuntimeExports.jsx(
|
|
720
|
+
`,Zu=e=>{const{isSelected:n}=e;return o.jsxRuntimeExports.jsx(Bu,{children:o.jsxRuntimeExports.jsx(o.components.Option,{...e,children:o.jsxRuntimeExports.jsxs(Qu,{"data-testid":t.generateDataTestId("cockpit-single-value-picker-option",typeof e.data.value=="string"?e.data.value:e.data.value?.code??e.data.value?.id??e.label),children:[o.jsxRuntimeExports.jsx(t.StandardRegular,{children:e.label}),!!n&&o.jsxRuntimeExports.jsx("div",{children:o.jsxRuntimeExports.jsx(t.SvgTick,{width:t.Space.sp3,height:t.Space.sp3})})]})})})},Xu=({children:e,...n})=>o.jsxRuntimeExports.jsx(o.components.SingleValue,{...n,children:o.jsxRuntimeExports.jsx(t.ExtraSmallRegular,{children:n.data.selectedLabel??e.toUpperCase()})}),Qu=s.div`
|
|
721
721
|
width: 100%;
|
|
722
722
|
display: flex;
|
|
723
723
|
align-items: center;
|
|
@@ -823,7 +823,7 @@
|
|
|
823
823
|
fill: ${e=>e.theme.colors.grey1};
|
|
824
824
|
`,$m=({chips:e})=>o.jsxRuntimeExports.jsx(jm,{children:e.length>0?e.map((n,r)=>o.jsxRuntimeExports.jsx(bm,{color:n.color,children:n.label},`${n.label}_${r}`)):o.jsxRuntimeExports.jsx(Rm,{children:"-"})}),Hn=[t.lightColors.graphColor34,t.lightColors.graphColor08,t.lightColors.graphColor11,t.lightColors.graphColor13,t.lightColors.graphColor19,t.lightColors.graphColor20,t.lightColors.graphColor14,t.lightColors.graphColor35,t.lightColors.graphColor32,t.lightColors.graphColor02,t.lightColors.graphColor06,t.lightColors.graphColor04,t.lightColors.graphColor10,t.lightColors.graphColor12,t.lightColors.graphColor15,t.lightColors.graphColor18],Em=e=>{const n=String.prototype.concat(...new Set(e));let r=0;for(let i=0;i<n.length;++i)r=r+n.charCodeAt(i);return r};function vm(e,n=0){const r=Em(e)+n*n*n;return Hn[Math.floor(r/Hn.length)%Hn.length]}const wm=e=>e.map(n=>({label:n,color:vm(n,n.length)})),Oa={z1:{bgColor:new o.Color(t.lightColors.primary),color:new o.Color(t.darkColors.primary),borderColor:new o.Color(t.lightColors.primary)},z2:{bgColor:new o.Color(t.lightColors.champion),color:new o.Color(t.darkColors.primary),borderColor:new o.Color(t.lightColors.champion)},z3:{bgColor:new o.Color(t.lightColors.hero),color:new o.Color(t.darkColors.primary),borderColor:new o.Color(t.lightColors.hero)},z4:{bgColor:new o.Color(t.lightColors.grey1),color:new o.Color(t.darkColors.primary),borderColor:new o.Color(t.lightColors.grey1)},z5:{bgColor:new o.Color(t.lightColors.grey2),color:new o.Color(t.darkColors.primary),borderColor:new o.Color(t.lightColors.grey2)},enterprise:{bgColor:new o.Color(t.lightColors.primary),color:new o.Color(t.darkColors.primary),borderColor:new o.Color(t.lightColors.primary)},growth:{bgColor:new o.Color(t.lightColors.champion),color:new o.Color(t.darkColors.primary),borderColor:new o.Color(t.lightColors.champion)},starter:{bgColor:new o.Color(t.lightColors.hero),color:new o.Color(t.darkColors.primary),borderColor:new o.Color(t.lightColors.hero)}},km=e=>e.map(n=>({value:n,options:Oa[n.id]})),{common:{texts:Tm}}=t.appLocale.getLocalizedStrings(),Im=({onSelectionChanged:e,selectedGroupIndex:n,allGroups:r})=>{const i=km(r);return o.jsxRuntimeExports.jsx(Pm,{children:o.jsxRuntimeExports.jsx(Xs,{customization:{placeholderLabel:Tm.group},onSelectedValueChanged:a=>{const c=i.findIndex(l=>l.value.id===(a?.value).id);e(c,a?.value)},allowedValues:i,selectedValue:n!=null?i[n]:void 0})})},Pm=s.div`
|
|
825
825
|
width: 70%;
|
|
826
|
-
`,Lm=({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:c}})=>o.jsxRuntimeExports.jsx(Im,{onSelectionChanged:l=>c({allGroups:r.allGroups,selectedValue:r.allGroups[l]}),selectedGroupIndex:r.allGroups.findIndex(l=>l.id===a.selectedValue?.id),allGroups:r.allGroups})})},{cockpit:{management:{header:Kn}},common:{texts:{name:Am,task:Dm,status:Om,group:Nm,plans:Mm,controller:zm,csManager:Fm,preparer:
|
|
826
|
+
`,Lm=({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:c}})=>o.jsxRuntimeExports.jsx(Im,{onSelectionChanged:l=>c({allGroups:r.allGroups,selectedValue:r.allGroups[l]}),selectedGroupIndex:r.allGroups.findIndex(l=>l.id===a.selectedValue?.id),allGroups:r.allGroups})})},{cockpit:{management:{header:Kn}},common:{texts:{name:Am,task:Dm,status:Om,group:Nm,plans:Mm,controller:zm,csManager:Fm,preparer:_m,reviewer:Bm,apAnalyst:Wm,taxStatus:Vm,taxLead:Um,mrr:Hm,arr:Km,productVerticals:Gm,realmId:Ym}}}=t.appLocale.getLocalizedStrings(),zt=[{key:"companyName",value:Am,sortOrder:"ascending",width:new t.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"task",value:Dm,sortOrder:"ascending",width:new t.ResponsiveSized(117,117),isThreadAllowed:!0},{key:"status",value:Om,sortOrder:"ascending",width:new t.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"group",value:Nm,sortOrder:"ascending",width:new t.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"plans",value:Mm,sortOrder:"ascending",width:new t.ResponsiveSized(275,275),isThreadAllowed:!0},{key:"satisfaction",value:Kn.satisfaction,sortOrder:"ascending",width:new t.ResponsiveSized(149,149),isThreadAllowed:!0},{key:"bookCloseDate",value:Kn.bookCloseDate,sortOrder:"ascending",width:new t.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"reportSent",value:Kn.reportSent,sortOrder:"ascending",width:new t.ResponsiveSized(380,380),isThreadAllowed:!0},{key:"controller",value:zm,sortOrder:"ascending",width:new t.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"customerSuccessManager",value:Fm,sortOrder:"ascending",width:new t.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"preparer",value:_m,sortOrder:"ascending",width:new t.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"reviewer",value:Bm,sortOrder:"ascending",width:new t.ResponsiveSized(216,216),isThreadAllowed:!0},{key:"apAnalyst",value:Wm,sortOrder:"ascending",width:new t.ResponsiveSized(216,216),isThreadAllowed:!0},{key:"taxStatus",value:Vm,sortOrder:"ascending",width:new t.ResponsiveSized(282,282),isThreadAllowed:!0},{key:"taxLead",value:Um,sortOrder:"ascending",width:new t.ResponsiveSized(232,232),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:Hm,sortOrder:"ascending",width:new t.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"annualRecurringRevenue",value:Km,sortOrder:"ascending",width:new t.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"productVerticals",value:Gm,sortOrder:"ascending",width:new t.ResponsiveSized(360,360),isThreadAllowed:!1},{key:"realmId",value:Ym,sortOrder:"ascending",width:new t.ResponsiveSized(120,120),isThreadAllowed:!1}];zt.map(e=>e.key);var Me=(e=>(e.CUSTOMER="customer",e.TEAM="team",e))(Me||{});const Zm=({activeEntity:e,teamNote:n,customerNote:r})=>e===Me.CUSTOMER?r:e===Me.TEAM?n:"",Xm=({activeEntity:e,teamRating:n,customerRating:r})=>{if(e===Me.CUSTOMER)return r;if(e===Me.TEAM)return n},Qm=({activeEntity:e,teamRatingLastUpdatedBy:n,customerRatingLastUpdatedBy:r})=>{if(e===Me.CUSTOMER)return r;if(e===Me.TEAM)return n},qm=({activeEntity:e,customerRatingLastUpdatedDate:n,teamRatingLastUpdatedDate:r})=>{if(e===Me.CUSTOMER)return n;if(e===Me.TEAM)return r},Ds=({teamRating:e,teamNote:n,customerRating:r,customerNote:i,activeEntity:a})=>{const c=Xm({activeEntity:a,teamRating:e,customerRating:r}),l=Zm({activeEntity:a,teamNote:n,customerNote:i});return{savedOption:c,savedNote:l}},Jm=({teamRating:e,customerRating:n,teamNote:r,customerNote:i,activeEntity:a,selectedOption:c,noteValue:l})=>{if(a!=null){const{savedOption:d,savedNote:u}=Ds({teamRating:e,teamNote:r,customerRating:n,customerNote:i,activeEntity:a});return l.trim().length===0||d===c&&l===u||d!==c&&l===Na(u)}return!0},Na=e=>`
|
|
827
827
|
---------------
|
|
828
828
|
${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.createElement("circle",{cx:17,cy:22,r:16,stroke:"currentColor",strokeWidth:1.5,strokeDasharray:"3 3"}),ce.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.5 16H16V21H11V22.5H16V28H17.5V22.5H23V21H17.5V16Z",fill:"currentColor"}),ce.createElement("rect",{x:20,width:18,height:18,rx:9,fill:"currentColor"}),ce.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"})),tx=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.createElement("circle",{cx:17,cy:22,r:16,stroke:"currentColor",strokeWidth:1.5,strokeDasharray:"3 3"}),ce.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.5 16H16V21H11V22.5H16V28H17.5V22.5H23V21H17.5V16Z",fill:"currentColor"}),ce.createElement("rect",{x:20,width:18,height:18,rx:9,fill:"currentColor"}),ce.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"})),wr=s.button`
|
|
829
829
|
background: none;
|
|
@@ -955,7 +955,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
955
955
|
display: flex;
|
|
956
956
|
column-gap: ${t.Space.sp3};
|
|
957
957
|
align-items: center;
|
|
958
|
-
`,zx=({customerSatisfaction:e,onSave:n})=>{const[r,i]=p.useState(),[a,c]=p.useState(),[l,d]=p.useState(""),u=p.useRef(null),m=p.useRef(null),x=p.useCallback(E=>{const{savedOption:v,savedNote:$}=Ds({...e,activeEntity:E});c(v),d($)},[e]),f=p.useCallback(E=>{if(E!==a&&r!=null){const{savedOption:v,savedNote:$}=Ds({...e,activeEntity:r});if(c(E),v!=null){if(E===v){d($);return}d(Na($));return}d("")}},[a,r,e]),h=p.useCallback(E=>{d(E.target.value)},[]),S=p.useCallback((E,v)=>{v.preventDefault(),i(E),x(E)},[x]),j=p.useCallback(()=>{i(void 0),c(void 0),d("")},[]),g=p.useCallback(()=>{const E={...e};E.customerSatisfactionId=e.customerSatisfactionId,r===Me.CUSTOMER&&(E.customerRating=a,E.customerNote=l),r===Me.TEAM&&(E.teamRating=a,E.teamNote=l),i(void 0),n(E)},[a,l,r,e,n]),b=r===Me.CUSTOMER?Zo:r===Me.TEAM?Co:{},C=Jm({...e,activeEntity:r,selectedOption:a,noteValue:l}),y=()=>{const E=r===Me.CUSTOMER?u.current:m.current;return o.jsxRuntimeExports.jsx(Nx,{onClose:j,anchorEl:E,open:!!r,children:o.jsxRuntimeExports.jsx(Ox,{customerSatisfactionOptions:b,selectedOption:a,noteValue:l,lastUpdatedBy:Qm({...e,activeEntity:r}),lastUpdatedTime:qm({...e,activeEntity:r}),savedOption:r===Me.CUSTOMER?e.customerRating:e.teamRating,saveBtnDisabled:C,onCancel:j,onSave:g,onOptionChange:f,onNoteChange:h})})};return o.jsxRuntimeExports.jsxs(Mx,{children:[o.jsxRuntimeExports.jsx(Os,{ref:u,savedRating:e.customerRating,isActive:r===Me.CUSTOMER,entityType:Me.CUSTOMER,onClick:S}),o.jsxRuntimeExports.jsx(Os,{ref:m,savedRating:e.teamRating,isActive:r===Me.TEAM,entityType:Me.TEAM,onClick:S}),y()]})},Fx=({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(zx,{customerSatisfaction:n,onSave:a})})},
|
|
958
|
+
`,zx=({customerSatisfaction:e,onSave:n})=>{const[r,i]=p.useState(),[a,c]=p.useState(),[l,d]=p.useState(""),u=p.useRef(null),m=p.useRef(null),x=p.useCallback(E=>{const{savedOption:v,savedNote:$}=Ds({...e,activeEntity:E});c(v),d($)},[e]),f=p.useCallback(E=>{if(E!==a&&r!=null){const{savedOption:v,savedNote:$}=Ds({...e,activeEntity:r});if(c(E),v!=null){if(E===v){d($);return}d(Na($));return}d("")}},[a,r,e]),h=p.useCallback(E=>{d(E.target.value)},[]),S=p.useCallback((E,v)=>{v.preventDefault(),i(E),x(E)},[x]),j=p.useCallback(()=>{i(void 0),c(void 0),d("")},[]),g=p.useCallback(()=>{const E={...e};E.customerSatisfactionId=e.customerSatisfactionId,r===Me.CUSTOMER&&(E.customerRating=a,E.customerNote=l),r===Me.TEAM&&(E.teamRating=a,E.teamNote=l),i(void 0),n(E)},[a,l,r,e,n]),b=r===Me.CUSTOMER?Zo:r===Me.TEAM?Co:{},C=Jm({...e,activeEntity:r,selectedOption:a,noteValue:l}),y=()=>{const E=r===Me.CUSTOMER?u.current:m.current;return o.jsxRuntimeExports.jsx(Nx,{onClose:j,anchorEl:E,open:!!r,children:o.jsxRuntimeExports.jsx(Ox,{customerSatisfactionOptions:b,selectedOption:a,noteValue:l,lastUpdatedBy:Qm({...e,activeEntity:r}),lastUpdatedTime:qm({...e,activeEntity:r}),savedOption:r===Me.CUSTOMER?e.customerRating:e.teamRating,saveBtnDisabled:C,onCancel:j,onSave:g,onOptionChange:f,onNoteChange:h})})};return o.jsxRuntimeExports.jsxs(Mx,{children:[o.jsxRuntimeExports.jsx(Os,{ref:u,savedRating:e.customerRating,isActive:r===Me.CUSTOMER,entityType:Me.CUSTOMER,onClick:S}),o.jsxRuntimeExports.jsx(Os,{ref:m,savedRating:e.teamRating,isActive:r===Me.TEAM,entityType:Me.TEAM,onClick:S}),y()]})},Fx=({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(zx,{customerSatisfaction:n,onSave:a})})},_x={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)}},Bx=e=>e.map(n=>({value:n,options:_x[n.code]})),{common:{texts:Wx}}=t.appLocale.getLocalizedStrings(),Vx=({onSelectionChanged:e,selectedTaxStatusIndex:n,allTaxStatuses:r})=>{const i=Bx(r);return o.jsxRuntimeExports.jsx(Xs,{customization:{placeholderLabel:Wx.status},onSelectedValueChanged:a=>{const c=i.findIndex(l=>l.value.code===(a?.value).code);e(c,a?.value)},allowedValues:i,selectedValue:n!=null?i[n]:void 0})},Ux=({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:c}})=>o.jsxRuntimeExports.jsx(Vx,{onSelectionChanged:l=>c({allGroups:e.allTaxStatuses,selectedValue:e.allTaxStatuses[l]}),selectedTaxStatusIndex:e.allTaxStatuses.findIndex(l=>l.code===a.selectedValue?.code),allTaxStatuses:e.allTaxStatuses})})},{cockpit:{management:{realmId:{reset:Hx,update:en}}},common:ht}=t.appLocale.getLocalizedStrings(),Tr=500,Kx=({companyId:e,tenantName:n,updateFetchState:r,onReset:i,onUpdate:a})=>{const[c,l]=p.useState(null),[d,u]=p.useState(""),[m,x]=p.useState(null),f=p.useRef(r),h=p.useCallback(()=>{l(null),u("")},[]);p.useEffect(()=>{const $=f.current;f.current=r,m!=null&&$==="In-Progress"&&r!=="In-Progress"&&(r==="Completed"&&m==="update"&&h(),x(null))},[r,m,h]);const S=d.trim(),j=t.DIGITS_PATTERN.test(S),g=S.length>0&&!j,b=m==="update",C=m==="reset",y=m!==null||r==="In-Progress",E=()=>{!j||b||(a(e,S),x("update"))},v=()=>{i(e),x("reset"),h()};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(Gx,{children:[o.jsxRuntimeExports.jsx(t.Tooltip,{variant:"standard",title:ht.texts.resetRealmId,placement:"bottom",style:{fontSize:t.textStyles.smallSemiBold.fontSize,lineHeight:t.textStyles.smallSemiBold.lineHeight},children:o.jsxRuntimeExports.jsx(Ir,{type:"button","aria-label":ht.texts.resetRealmId,disabled:y,onClick:$=>{$.stopPropagation(),l("reset")},children:o.jsxRuntimeExports.jsx(Zx,{isSpinning:C})})}),o.jsxRuntimeExports.jsx(t.Tooltip,{variant:"standard",title:ht.texts.updateRealmId,placement:"bottom",style:{fontSize:t.textStyles.smallSemiBold.fontSize,lineHeight:t.textStyles.smallSemiBold.lineHeight},children:o.jsxRuntimeExports.jsx(Ir,{type:"button","aria-label":ht.texts.updateRealmId,disabled:y,onClick:$=>{$.stopPropagation(),l("update")},children:o.jsxRuntimeExports.jsx(Xx,{})})})]}),c==="reset"?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{containerStyle:{maxWidth:`${Tr}px`},titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:ht.texts.resetRealmId}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Hx.description.replace("{tenantName}",n)}),primaryButtonText:ht.reset,proceedButtonVariant:"destructive",secondaryButtonText:ht.cancel,secondaryButtonVariant:"secondary",action:{onOkClick:v,onCancelClick:h}}):null,c==="update"?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{containerStyle:{maxWidth:`${Tr}px`},titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:ht.texts.updateRealmId}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:en.description.replace("{tenantName}",n)}),primaryButtonText:ht.update,secondaryButtonText:ht.cancel,secondaryButtonVariant:"secondary",isLoading:b,isDisabled:b,isProceedDisabled:!j||b,shouldClickAway:!b,action:{onOkClick:E,onCancelClick:h},children:o.jsxRuntimeExports.jsxs(Qx,{children:[o.jsxRuntimeExports.jsx(qx,{autoFocus:!0,type:"text",inputMode:"numeric",value:d,placeholder:en.inputPlaceholder,hasError:g,onChange:$=>u($.target.value),onKeyDown:$=>{$.key==="Enter"&&($.preventDefault(),E())}}),g?o.jsxRuntimeExports.jsx(Pr,{children:en.invalidRealmId}):null,o.jsxRuntimeExports.jsx(Pr,{children:en.caution.replace("{tenantName}",n)})]})}):null]})},Gx=s.div`
|
|
959
959
|
display: flex;
|
|
960
960
|
align-items: center;
|
|
961
961
|
gap: ${t.Space.sp2};
|
|
@@ -1017,7 +1017,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1017
1017
|
`,Pr=s(t.SmallRegularSp)`
|
|
1018
1018
|
text-align: left;
|
|
1019
1019
|
color: ${e=>e.theme.colors.important};
|
|
1020
|
-
`,po=e=>ce.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.createElement("path",{d:"M6 8H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M6 6H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.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"})),za=e=>ce.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.createElement("path",{d:"M11 14.9629H2V3.86499",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M10.0559 8.31177H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M10.0559 5.7395H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M6.52014 5.73978L7.163 6.38264L8.44871 5.09692",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M6.52014 8.31107L7.163 8.95393L8.44871 7.66821",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.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:{productVerticals:{placeholder:Jx},editMonthInsight:eh,createMonthInsight:th,monthInsightSent:oh,monthInsightNotReady:nh,monthInsightsCanBeSentFromDashboard:sh,sendMonthInsightsFromDashboardWhenReady:rh,monthInsightsCanBeEditedFromDashboard:ih,monthEndHistoryUnavailable:ah}},dateFormat:Qs,common:Ye}=t.appLocale.getLocalizedStrings(),lh=Qs.visual.MMMMFormat,Lr={status:Ye.texts.status,group:Ye.texts.group,plans:Ye.texts.plans,controller:Ye.texts.controller,customerSuccessManager:Ye.texts.csManager,preparer:Ye.texts.preparer,reviewer:Ye.texts.reviewer,apAnalyst:Ye.texts.apAnalyst,reportSent:Ye.texts.date,taxStatus:Ye.texts.status,taxLead:Ye.texts.taxLead},ch=["status","group","reportSent","taxStatus","customerSatisfaction"],dh=({reportSent:e,hasMonthEndEmailHistory:n,onReportSentClick:r})=>{if(e.date==null)return o.jsxRuntimeExports.jsx(Gn,{children:Ye.strings.hyphen});const i=`${Ye.datePicker.businessDay} ${e.businessDay??Ye.strings.empty}${Ye.strings.colon} ${e.date.format(Qs.visual.DMMMFormat)}`;return n?o.jsxRuntimeExports.jsx(Gn,{onClick:r,children:i}):o.jsxRuntimeExports.jsx(t.Tooltip,{placement:"bottom-end",variant:"small-description",data:ah,style:{color:t.Colors.championDark,marginTop:t.Space.sp2},display:"flex",children:o.jsxRuntimeExports.jsx(Gn,{children:i})})},ph=({companyView:e,hasMonthEndEmailHistory:n,companiesExcludedFromMonthEndReport:r,showDetailsPageLink:i,allUsers:a,loggedInUserRole:c,companyNameSticky:l,totalHeight:d,isExpenseAutomationEnabledForUser:u,addThreadRequestThreadId:m,targetElementFromNavigation:x,resetTargetElementFromNavigation:f,setNoteData:h,setElementRef:S,setAddThreadRequestThreadId:j,changeHandlers:g,onCompanyNameClicked:b,onPassportIconClicked:C,onTaskIconClicked:y,onViewDetailsLinkClicked:E,onMonthEndReportPageClick:v,showMonthEndReportHistoricData:$,isProductVerticalsColumnVisible:I=!1,onProductVerticalsChanged:w,isRealmIdColumnVisible:T=!1,realmIdUpdateFetchState:z,onRealmIdReset:B,onRealmIdUpdate:H})=>{const[U,K]=p.useState(null),W=t.useWindowSizeContext(),R=o.useForm({mode:"all"}),[A,_]=p.useState(!1),{companyId:P,name:k}=e.company.company.companyInfo,N=iu(nu(e)),V={allOptions:ru(N),selectedOptions:N},ee=p.useRef(N);p.useEffect(()=>{ee.current=N,R.setValue("productVerticals",V)},[P]);const Y=["companyData.status","companyData.group","companyData.controller","companyData.customerSuccessManager","companyData.preparer","companyData.reviewer","companyData.apAnalyst","companyData.reportSent","companyData.taxStatus","companyData.taxLead","companyData.customerSatisfaction"],Z=`cockpit_${P}`,Q="management.notes",{threads:F,isLoading:ue}=t.useFilteredThreads({entityType:Q,companyId:P},!1),{openThread:q,threads:G,addThread:ie,removeThread:ae,setOpenThread:me}=p.useContext(t.ThreadsContext),je=q!==null?G.get(q):null,D=q?.includes(P)===!0,de=q!=null&&G.get(q)==null&&D,le=m!=null&&G.get(m)?.metadata.companyId===P,xe=(O,he)=>{Y.includes(O)&&g(P,he)};p.useEffect(()=>{const O=R.watch((he,{name:Re})=>{if(Re!=null&&Re.startsWith("companyData.")&&he.companyData!=null&&o.defer(()=>xe(Re,Th(he.companyData,Re))),Re==="productVerticals"&&he.productVerticals!=null){const Oe=he.productVerticals.selectedOptions,Ee=au(ee.current,Oe);ee.current=Oe,Object.keys(Ee).length>0&&w?.(P,Ee)}});return()=>{O.unsubscribe()}});const L=kh(e,a),ge=()=>{e.company.schema.status.length===0?_(!0):b(e)},Te=()=>{v?.(e)},M=c?.userRoles?.includes("admin"),fe=e.company.company.configInfo.isMonthEndReportInDraft,se=J.canSendMonthEndEmailReport(e,r),te=J.shouldEnableCalendarPickerForLastReportSent(e,r),we=e.company.company.companyInfo.bookCloseDate,Se=e.company.company.managementInfo.lastReportSentDate,He=e.taskSummary?.count??0,Ie=p.useCallback(()=>{q?.includes(t.NEW_THREAD_SUFFIX)===!0&&ae(q),m!=null&&j(void 0)},[m,q,ae,j]),X=p.useCallback(O=>{if(O===q)me(null);else if(G.has(O))me(O);else if(O.includes(t.NEW_THREAD_SUFFIX)){const[he,Re]=O.replace(t.NEW_THREAD_SUFFIX,"").split("."),Oe=co(_t(he),J.toManagementSortKeyType(Re),P,k);ie(O,{type:"thread",visibility:"public",id:O,roomId:Z,createdAt:new Date,updatedAt:new Date,comments:[],metadata:Oe,resolved:!1}),me(O)}},[P,k,q,G,ie,me,Z]),ke=p.useCallback((O,he,Re=!1)=>{const Oe=zt.find(Ee=>Ee.key===he);if(f(),Oe!=null&&(O.type==="contextmenu"||Re===!0)){if(Oe.isThreadAllowed===!1)return;Ie(),O.preventDefault(),O.stopPropagation();const Ee=t.toCollaborationEntityType({tab:"management",key:Oe.key});if(O.target instanceof HTMLElement||O.target instanceof SVGElement)if(Re===!0&&O.target instanceof HTMLElement)K(O.target.parentElement);else if(O.target instanceof HTMLElement){const Qe=Zs(O.target,ne);K(Qe||O.target)}else{const Qe=O.target.closest(`.${ne}`);Qe instanceof HTMLElement&&K(Qe)}const Xe=[...t.getFilteredThreads(G,{entityType:Ee,companyId:P},"both")],be=Xe.length>0&&Xe[0].length>0?Xe[0][0]:Le("management",Oe.key,P);G.has(be)?X(be):m===be?j(void 0):(j(be),me(null))}},[G,P,m,X,j,me,f,Ie]),Ce=p.useCallback((O,he)=>{O.stopPropagation();const Re=Le("management",he,P);j(void 0),X(Re)},[P,j,X]),uo=()=>{L.reportSent.date!=null&&$(P,L.reportSent.date)},Ve=O=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:O.isElementThreadOpen??!1,isElementThreadPresent:O.isElementThreadPresent??!1,itemKey:O.itemKey,elementThreadId:O.elementThreadId??"",roomId:Z,addThreadRequestThreadId:m,openThreadId:q,threadStyle:O.threadStyle,openThreadMetadata:je?.metadata??null,onElementClick:ke,onAddThreadClick:Ce,targetElement:x??U});return o.jsxRuntimeExports.jsxs(o.FormProvider,{...R,children:[A===!0?o.jsxRuntimeExports.jsx(Cm,{companyDomain:e.company.company.companyInfo.primaryEmailDomain,hasAdminRole:M,onCancelClick:()=>_(!1),onConnectClick:()=>b(e)}):null,o.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{f(),m!=null&&(j(void 0),m.includes(t.NEW_THREAD_SUFFIX)&&ae(m))},children:o.jsxRuntimeExports.jsx(uh,{windowSize:W,hoverParentSubsidiaryTag:i??!1,isThreadOpen:D||le,totalHeight:d,isCreationInProgress:de,children:zt.map((O,he)=>{const Re=t.toCollaborationEntityType({tab:"management",key:O.key}),Ee=zt.length-(I?0:1)-(T?0:1)-2<=he,Xe=[...t.getFilteredThreads(G,{entityType:Re,companyId:P},"both")],be=Xe.length>0&&Xe[0].length>0?Xe[0][0]:Le("management",O.key,P),Qe=G.get(be),qe=Qe!=null&&Qe.resolved===!1,Ke=be===q,Ue=m===be;switch(O.key){case"companyName":return o.jsxRuntimeExports.jsxs(Sh,{companyNameSticky:l,columnWidth:O.width,windowSize:W,isThreadOpen:Ke||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),ref:oe=>{S(P,O.key,oe)},children:[o.jsxRuntimeExports.jsxs(hh,{children:[o.jsxRuntimeExports.jsx(gh,{className:"company-name",onClick:oe=>{oe.preventDefault(),oe.stopPropagation(),ge()},children:L.companyName}),L.parentSubsidiaryInfo&&o.jsxRuntimeExports.jsx(Fu,{companyId:L.companyId,isEnabled:i,onViewDetailsLinkClicked:E,companyName:L.companyName,parentSubsidiaryRelationship:L.parentSubsidiaryInfo}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:Ke,targetElement:x??U,roomId:Z,openThreadId:q,openThreadMetadata:je?.metadata??null})]}),o.jsxRuntimeExports.jsxs(yh,{children:[o.jsxRuntimeExports.jsxs(jh,{onClick:oe=>{oe.preventDefault(),h({roomId:Z,companyId:P,companyName:k,entityType:Q})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:F.length,isLoading:ue}),o.jsxRuntimeExports.jsx(bh,{})]}),o.jsxRuntimeExports.jsx(fh,{onClick:oe=>{oe.preventDefault(),C(e)},children:o.jsxRuntimeExports.jsx(Ch,{className:"passportIcon"})})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:qe,itemKey:O.key,style:{left:t.Space.sp4},onElementClick:ke}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Le("management",O.key,P),addThreadRequestThreadId:m,itemKey:O.key,onAddThreadClick:Ce})]},be);case"task":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsxs(Rh,{onClick:oe=>{oe.preventDefault(),y?.(e)},children:[o.jsxRuntimeExports.jsx($h,{}),He>0?o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{isLoading:!1,count:He}):null]}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"status":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(nm,{name:"companyData.status",value:L.status}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"group":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(Lm,{name:"companyData.group",value:L.group}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"plans":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx($m,{chips:L.plansAndAddons}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"satisfaction":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},windowSize:W,columnWidth:O.width,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(Fx,{name:"companyData.customerSatisfaction",value:L.customerSatisfaction}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"bookCloseDate":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[we?.format(Qs.visual.MMMDCommaYYYYformat)??Ye.strings.hyphen,Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"reportSent":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),style:{alignItems:"center"},children:[te&&o.jsxRuntimeExports.jsx(xh,{children:o.jsxRuntimeExports.jsx(t.ZeniDatePickerField,{name:"companyData.reportSent",defaultValue:L.reportSent})}),!te&&o.jsxRuntimeExports.jsx(dh,{reportSent:L.reportSent,onReportSentClick:uo,hasMonthEndEmailHistory:n}),o.jsxRuntimeExports.jsx(mh,{children:u?o.jsxRuntimeExports.jsx(Lh,{isMonthEndReportInDraft:fe,bookCloseDate:we,lastReportSentDate:Se,enableCompanyMonthEndReportBtn:se,handleMonthEndReportPageClick:Te}):o.jsxRuntimeExports.jsx(Ns,{isMonthEndReportInDraft:fe,bookCloseDate:we,lastReportSentDate:Se,enableCompanyMonthEndReportBtn:se,isExpenseAutomationEnabledForUser:u,handleMonthEndReportPageClick:Te})}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"customerSuccessManager":case"preparer":case"reviewer":case"apAnalyst":case"controller":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:`companyData.${O.key}`,value:L[O.key],placeholderLabel:Lr[O.key],pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"taxStatus":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(Ux,{name:"companyData.taxStatus",value:L.taxStatus}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"taxLead":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},hasLeadingGap:!0,columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:"companyData.taxLead",value:L.taxLead,placeholderLabel:Lr.taxLead,pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[t.amountToString("0,0",L.monthlyRecurringRevenue),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"annualRecurringRevenue":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[t.amountToString("0,0",L.annualRecurringRevenue),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"productVerticals":return I?o.jsxRuntimeExports.jsx(nt,{ref:oe=>{S(P,O.key,oe)},hasLeadingGap:!0,columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:o.jsxRuntimeExports.jsx(Da,{name:"productVerticals",defaultValue:V,placeholder:Jx,selectedOptionsAlignment:"left"})},be):null;case"realmId":return T?o.jsxRuntimeExports.jsx(nt,{ref:oe=>{S(P,O.key,oe)},hasLeadingGap:!0,columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:o.jsxRuntimeExports.jsx(Kx,{companyId:P,tenantName:L.companyName,updateFetchState:z,onReset:oe=>B?.(oe),onUpdate:(oe,_n)=>H?.(oe,_n)})},be):null;default:return null}})})})})]})},Ns=({enableCompanyMonthEndReportBtn:e,isMonthEndReportInDraft:n,isExpenseAutomationEnabledForUser:r,bookCloseDate:i,lastReportSentDate:a,handleMonthEndReportPageClick:c})=>o.jsxRuntimeExports.jsx(t.Button,{size:"small",onClick:c,variant:"primary",label:Ph(e,n,i,a),disabled:!e||r,style:e?{}:{background:"transparent"},prefixIcon:e&&n?o.jsxRuntimeExports.jsx(Eh,{}):void 0}),uh=s.div`
|
|
1020
|
+
`,po=e=>ce.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.createElement("path",{d:"M6 8H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M6 6H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.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"})),za=e=>ce.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.createElement("path",{d:"M11 14.9629H2V3.86499",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M10.0559 8.31177H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M10.0559 5.7395H11.7836",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M6.52014 5.73978L7.163 6.38264L8.44871 5.09692",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M6.52014 8.31107L7.163 8.95393L8.44871 7.66821",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.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:{productVerticals:{placeholder:Jx},editMonthInsight:eh,createMonthInsight:th,monthInsightSent:oh,monthInsightNotReady:nh,monthInsightsCanBeSentFromDashboard:sh,sendMonthInsightsFromDashboardWhenReady:rh,monthInsightsCanBeEditedFromDashboard:ih,monthEndHistoryUnavailable:ah}},dateFormat:Qs,common:Ye}=t.appLocale.getLocalizedStrings(),lh=Qs.visual.MMMMFormat,Lr={status:Ye.texts.status,group:Ye.texts.group,plans:Ye.texts.plans,controller:Ye.texts.controller,customerSuccessManager:Ye.texts.csManager,preparer:Ye.texts.preparer,reviewer:Ye.texts.reviewer,apAnalyst:Ye.texts.apAnalyst,reportSent:Ye.texts.date,taxStatus:Ye.texts.status,taxLead:Ye.texts.taxLead},ch=["status","group","reportSent","taxStatus","customerSatisfaction"],dh=({reportSent:e,hasMonthEndEmailHistory:n,onReportSentClick:r})=>{if(e.date==null)return o.jsxRuntimeExports.jsx(Gn,{children:Ye.strings.hyphen});const i=`${Ye.datePicker.businessDay} ${e.businessDay??Ye.strings.empty}${Ye.strings.colon} ${e.date.format(Qs.visual.DMMMFormat)}`;return n?o.jsxRuntimeExports.jsx(Gn,{onClick:r,children:i}):o.jsxRuntimeExports.jsx(t.Tooltip,{placement:"bottom-end",variant:"small-description",data:ah,style:{color:t.Colors.championDark,marginTop:t.Space.sp2},display:"flex",children:o.jsxRuntimeExports.jsx(Gn,{children:i})})},ph=({companyView:e,hasMonthEndEmailHistory:n,companiesExcludedFromMonthEndReport:r,showDetailsPageLink:i,allUsers:a,loggedInUserRole:c,companyNameSticky:l,totalHeight:d,isExpenseAutomationEnabledForUser:u,addThreadRequestThreadId:m,targetElementFromNavigation:x,resetTargetElementFromNavigation:f,setNoteData:h,setElementRef:S,setAddThreadRequestThreadId:j,changeHandlers:g,onCompanyNameClicked:b,onPassportIconClicked:C,onTaskIconClicked:y,onViewDetailsLinkClicked:E,onMonthEndReportPageClick:v,showMonthEndReportHistoricData:$,isProductVerticalsColumnVisible:I=!1,onProductVerticalsChanged:w,isRealmIdColumnVisible:T=!1,realmIdUpdateFetchState:z,onRealmIdReset:_,onRealmIdUpdate:H})=>{const[U,K]=p.useState(null),W=t.useWindowSizeContext(),R=o.useForm({mode:"all"}),[A,B]=p.useState(!1),{companyId:P,name:k}=e.company.company.companyInfo,N=iu(nu(e)),V={allOptions:ru(N),selectedOptions:N},ee=p.useRef(N);p.useEffect(()=>{ee.current=N,R.setValue("productVerticals",V)},[P]);const Y=["companyData.status","companyData.group","companyData.controller","companyData.customerSuccessManager","companyData.preparer","companyData.reviewer","companyData.apAnalyst","companyData.reportSent","companyData.taxStatus","companyData.taxLead","companyData.customerSatisfaction"],Z=`cockpit_${P}`,Q="management.notes",{threads:F,isLoading:ue}=t.useFilteredThreads({entityType:Q,companyId:P},!1),{openThread:q,threads:G,addThread:ie,removeThread:ae,setOpenThread:me}=p.useContext(t.ThreadsContext),je=q!==null?G.get(q):null,D=q?.includes(P)===!0,de=q!=null&&G.get(q)==null&&D,le=m!=null&&G.get(m)?.metadata.companyId===P,xe=(O,he)=>{Y.includes(O)&&g(P,he)};p.useEffect(()=>{const O=R.watch((he,{name:Re})=>{if(Re!=null&&Re.startsWith("companyData.")&&he.companyData!=null&&o.defer(()=>xe(Re,Th(he.companyData,Re))),Re==="productVerticals"&&he.productVerticals!=null){const Oe=he.productVerticals.selectedOptions,Ee=au(ee.current,Oe);ee.current=Oe,Object.keys(Ee).length>0&&w?.(P,Ee)}});return()=>{O.unsubscribe()}});const L=kh(e,a),ge=()=>{e.company.schema.status.length===0?B(!0):b(e)},Te=()=>{v?.(e)},M=c?.userRoles?.includes("admin"),fe=e.company.company.configInfo.isMonthEndReportInDraft,se=J.canSendMonthEndEmailReport(e,r),te=J.shouldEnableCalendarPickerForLastReportSent(e,r),we=e.company.company.companyInfo.bookCloseDate,Se=e.company.company.managementInfo.lastReportSentDate,He=e.taskSummary?.count??0,Ie=p.useCallback(()=>{q?.includes(t.NEW_THREAD_SUFFIX)===!0&&ae(q),m!=null&&j(void 0)},[m,q,ae,j]),X=p.useCallback(O=>{if(O===q)me(null);else if(G.has(O))me(O);else if(O.includes(t.NEW_THREAD_SUFFIX)){const[he,Re]=O.replace(t.NEW_THREAD_SUFFIX,"").split("."),Oe=co(Bt(he),J.toManagementSortKeyType(Re),P,k);ie(O,{type:"thread",visibility:"public",id:O,roomId:Z,createdAt:new Date,updatedAt:new Date,comments:[],metadata:Oe,resolved:!1}),me(O)}},[P,k,q,G,ie,me,Z]),ke=p.useCallback((O,he,Re=!1)=>{const Oe=zt.find(Ee=>Ee.key===he);if(f(),Oe!=null&&(O.type==="contextmenu"||Re===!0)){if(Oe.isThreadAllowed===!1)return;Ie(),O.preventDefault(),O.stopPropagation();const Ee=t.toCollaborationEntityType({tab:"management",key:Oe.key});if(O.target instanceof HTMLElement||O.target instanceof SVGElement)if(Re===!0&&O.target instanceof HTMLElement)K(O.target.parentElement);else if(O.target instanceof HTMLElement){const Qe=Zs(O.target,ne);K(Qe||O.target)}else{const Qe=O.target.closest(`.${ne}`);Qe instanceof HTMLElement&&K(Qe)}const Xe=[...t.getFilteredThreads(G,{entityType:Ee,companyId:P},"both")],be=Xe.length>0&&Xe[0].length>0?Xe[0][0]:Le("management",Oe.key,P);G.has(be)?X(be):m===be?j(void 0):(j(be),me(null))}},[G,P,m,X,j,me,f,Ie]),Ce=p.useCallback((O,he)=>{O.stopPropagation();const Re=Le("management",he,P);j(void 0),X(Re)},[P,j,X]),uo=()=>{L.reportSent.date!=null&&$(P,L.reportSent.date)},Ve=O=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:O.isElementThreadOpen??!1,isElementThreadPresent:O.isElementThreadPresent??!1,itemKey:O.itemKey,elementThreadId:O.elementThreadId??"",roomId:Z,addThreadRequestThreadId:m,openThreadId:q,threadStyle:O.threadStyle,openThreadMetadata:je?.metadata??null,onElementClick:ke,onAddThreadClick:Ce,targetElement:x??U});return o.jsxRuntimeExports.jsxs(o.FormProvider,{...R,children:[A===!0?o.jsxRuntimeExports.jsx(Cm,{companyDomain:e.company.company.companyInfo.primaryEmailDomain,hasAdminRole:M,onCancelClick:()=>B(!1),onConnectClick:()=>b(e)}):null,o.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{f(),m!=null&&(j(void 0),m.includes(t.NEW_THREAD_SUFFIX)&&ae(m))},children:o.jsxRuntimeExports.jsx(uh,{windowSize:W,hoverParentSubsidiaryTag:i??!1,isThreadOpen:D||le,totalHeight:d,isCreationInProgress:de,children:zt.map((O,he)=>{const Re=t.toCollaborationEntityType({tab:"management",key:O.key}),Ee=zt.length-(I?0:1)-(T?0:1)-2<=he,Xe=[...t.getFilteredThreads(G,{entityType:Re,companyId:P},"both")],be=Xe.length>0&&Xe[0].length>0?Xe[0][0]:Le("management",O.key,P),Qe=G.get(be),qe=Qe!=null&&Qe.resolved===!1,Ke=be===q,Ue=m===be;switch(O.key){case"companyName":return o.jsxRuntimeExports.jsxs(Sh,{companyNameSticky:l,columnWidth:O.width,windowSize:W,isThreadOpen:Ke||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),ref:oe=>{S(P,O.key,oe)},children:[o.jsxRuntimeExports.jsxs(hh,{children:[o.jsxRuntimeExports.jsx(gh,{className:"company-name",onClick:oe=>{oe.preventDefault(),oe.stopPropagation(),ge()},children:L.companyName}),L.parentSubsidiaryInfo&&o.jsxRuntimeExports.jsx(Fu,{companyId:L.companyId,isEnabled:i,onViewDetailsLinkClicked:E,companyName:L.companyName,parentSubsidiaryRelationship:L.parentSubsidiaryInfo}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:Ke,targetElement:x??U,roomId:Z,openThreadId:q,openThreadMetadata:je?.metadata??null})]}),o.jsxRuntimeExports.jsxs(yh,{children:[o.jsxRuntimeExports.jsxs(jh,{onClick:oe=>{oe.preventDefault(),h({roomId:Z,companyId:P,companyName:k,entityType:Q})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:F.length,isLoading:ue}),o.jsxRuntimeExports.jsx(bh,{})]}),o.jsxRuntimeExports.jsx(fh,{onClick:oe=>{oe.preventDefault(),C(e)},children:o.jsxRuntimeExports.jsx(Ch,{className:"passportIcon"})})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:qe,itemKey:O.key,style:{left:t.Space.sp4},onElementClick:ke}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Le("management",O.key,P),addThreadRequestThreadId:m,itemKey:O.key,onAddThreadClick:Ce})]},be);case"task":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsxs(Rh,{onClick:oe=>{oe.preventDefault(),y?.(e)},children:[o.jsxRuntimeExports.jsx($h,{}),He>0?o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{isLoading:!1,count:He}):null]}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"status":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(nm,{name:"companyData.status",value:L.status}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"group":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(Lm,{name:"companyData.group",value:L.group}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"plans":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx($m,{chips:L.plansAndAddons}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"satisfaction":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},windowSize:W,columnWidth:O.width,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(Fx,{name:"companyData.customerSatisfaction",value:L.customerSatisfaction}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"bookCloseDate":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[we?.format(Qs.visual.MMMDCommaYYYYformat)??Ye.strings.hyphen,Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"reportSent":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),style:{alignItems:"center"},children:[te&&o.jsxRuntimeExports.jsx(xh,{children:o.jsxRuntimeExports.jsx(t.ZeniDatePickerField,{name:"companyData.reportSent",defaultValue:L.reportSent})}),!te&&o.jsxRuntimeExports.jsx(dh,{reportSent:L.reportSent,onReportSentClick:uo,hasMonthEndEmailHistory:n}),o.jsxRuntimeExports.jsx(mh,{children:u?o.jsxRuntimeExports.jsx(Lh,{isMonthEndReportInDraft:fe,bookCloseDate:we,lastReportSentDate:Se,enableCompanyMonthEndReportBtn:se,handleMonthEndReportPageClick:Te}):o.jsxRuntimeExports.jsx(Ns,{isMonthEndReportInDraft:fe,bookCloseDate:we,lastReportSentDate:Se,enableCompanyMonthEndReportBtn:se,isExpenseAutomationEnabledForUser:u,handleMonthEndReportPageClick:Te})}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"customerSuccessManager":case"preparer":case"reviewer":case"apAnalyst":case"controller":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:`companyData.${O.key}`,value:L[O.key],placeholderLabel:Lr[O.key],pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"taxStatus":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(Ux,{name:"companyData.taxStatus",value:L.taxStatus}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"taxLead":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},hasLeadingGap:!0,columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:"companyData.taxLead",value:L.taxLead,placeholderLabel:Lr.taxLead,pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[t.amountToString("0,0",L.monthlyRecurringRevenue),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"annualRecurringRevenue":return o.jsxRuntimeExports.jsxs(nt,{ref:oe=>{S(P,O.key,oe)},columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:[t.amountToString("0,0",L.annualRecurringRevenue),Ve({isElementThreadOpen:Ke,isElementThreadPresent:qe,itemKey:O.key,elementThreadId:be,threadStyle:Ee?{right:t.Space.sp0}:void 0})]},be);case"productVerticals":return I?o.jsxRuntimeExports.jsx(nt,{ref:oe=>{S(P,O.key,oe)},hasLeadingGap:!0,columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:o.jsxRuntimeExports.jsx(Da,{name:"productVerticals",defaultValue:V,placeholder:Jx,selectedOptionsAlignment:"left"})},be):null;case"realmId":return T?o.jsxRuntimeExports.jsx(nt,{ref:oe=>{S(P,O.key,oe)},hasLeadingGap:!0,columnWidth:O.width,windowSize:W,isThreadOpen:D||Ue,isThreadAllowed:O.isThreadAllowed,className:ne,onContextMenu:oe=>ke(oe,O.key),children:o.jsxRuntimeExports.jsx(Kx,{companyId:P,tenantName:L.companyName,updateFetchState:z,onReset:oe=>_?.(oe),onUpdate:(oe,Bn)=>H?.(oe,Bn)})},be):null;default:return null}})})})})]})},Ns=({enableCompanyMonthEndReportBtn:e,isMonthEndReportInDraft:n,isExpenseAutomationEnabledForUser:r,bookCloseDate:i,lastReportSentDate:a,handleMonthEndReportPageClick:c})=>o.jsxRuntimeExports.jsx(t.Button,{size:"small",onClick:c,variant:"primary",label:Ph(e,n,i,a),disabled:!e||r,style:e?{}:{background:"transparent"},prefixIcon:e&&n?o.jsxRuntimeExports.jsx(Eh,{}):void 0}),uh=s.div`
|
|
1021
1021
|
display: flex;
|
|
1022
1022
|
flex-direction: row;
|
|
1023
1023
|
align-items: center;
|
|
@@ -1173,7 +1173,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1173
1173
|
width: 12px;
|
|
1174
1174
|
height: 12px;
|
|
1175
1175
|
color: ${e=>e.theme.colors.grey5};
|
|
1176
|
-
`,vh=e=>{const n=[];return e.subscriptions.forEach(r=>{r.plan&&n.push(r.plan.plan.zeniSku)}),n},wh=e=>{const n=[];return e.subscriptions.forEach(r=>{r.addOns.forEach(i=>{i.addOn.zeniSku!=null&&n.push(i.addOn.zeniSku)})}),n};function kh(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:wm([...new Set(vh(e).concat(wh(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:J.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 Th(e,n){const r={};r.users=[];const i=n.split(".")[1];if(Ih(i))return{[i]:e[i]};{const{selectedUsers:a,deSelectedUsers:c}=e[i];return c==null||c?.length==0?a.forEach(l=>{l.isUserSelectionUpdated===!0&&r.users?.push(Ar(i,l.userId,l.isRoleSelected))}):c.forEach(l=>{r.users?.push(Ar(i,l.userId,l.isRoleSelected))}),{users:r.users}}}const Ih=e=>ch.includes(e);function Ar(e,n,r){switch(e){case"apAnalyst":return{isZeni:!0,role:J.toUserRoleType("ap_analyst"),userId:n,isSelected:r};case"taxLead":return{isZeni:!0,role:J.toUserRoleType("tax_lead"),userId:n,isSelected:r};case"customerSuccessManager":return{isZeni:!0,role:J.toUserRoleType("customer_success_manager"),userId:n,isSelected:r};default:return{isZeni:!0,role:e,userId:n,isSelected:r}}}const Ph=(e,n,r,i)=>{const a=J.dateNow().subtract(1,"month").format(lh),c=J.dateNow().startOf("month").subtract(1,"day"),l=r?.isSame(c)===!0&&i?.isAfter(r);return e?n?eh.replace("__month__",a):th.replace("__month__",a):l===!0?oh:nh.replace("__month__",a)},Lh=({enableCompanyMonthEndReportBtn:e,isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,handleMonthEndReportPageClick:a})=>{const c=J.dateNow().startOf("month").subtract(1,"day"),l=r?.isSame(c)===!0&&i?.isAfter(r),d=e?n?ih:sh:l===!0?null:rh;return d!=null?o.jsxRuntimeExports.jsx(t.Tooltip,{display:"block",placement:"bottom",maxWidth:"250",title:d,enterDelay:600,children:o.jsxRuntimeExports.jsx(Ns,{isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,enableCompanyMonthEndReportBtn:e,isExpenseAutomationEnabledForUser:!0,handleMonthEndReportPageClick:a})}):o.jsxRuntimeExports.jsx(Ns,{isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,enableCompanyMonthEndReportBtn:e,isExpenseAutomationEnabledForUser:!0,handleMonthEndReportPageClick:a})};function Ah({companyNameSticky:e,sortConfig:n,isProductVerticalsColumnVisible:r=!1,isRealmIdColumnVisible:i=!1,onColumnSortConfigChanged:a}){const c=t.useWindowSizeContext(),[l,d]=p.useState(o.cloneDeep(zt)),u=l.filter(x=>x.key==="productVerticals"?r:x.key==="realmId"?i:!0);p.useEffect(()=>{const x=[...l];for(const f of x)f.key===n.sortKey?f.sortOrder=n.sortOrder:f.sortOrder="ascending";d(x)},[n.sortKey,n.sortOrder]);const m=(x,f)=>{let h=f;n.sortKey===x&&(h=f==="ascending"?"descending":"ascending"),a(x,h)};return o.jsxRuntimeExports.jsx(Nh,{height:io,children:u.map(x=>o.jsxRuntimeExports.jsxs(Mh,{companyNameSticky:e&&x.key==="companyName",sortDataValue:n.sortKey,actualDataValue:x.key,wrapperWidth:x.width,hasLeadingGap:x.key==="productVerticals"||x.key==="realmId"||x.key==="taxLead",windowSize:c,children:[o.jsxRuntimeExports.jsxs(
|
|
1176
|
+
`,vh=e=>{const n=[];return e.subscriptions.forEach(r=>{r.plan&&n.push(r.plan.plan.zeniSku)}),n},wh=e=>{const n=[];return e.subscriptions.forEach(r=>{r.addOns.forEach(i=>{i.addOn.zeniSku!=null&&n.push(i.addOn.zeniSku)})}),n};function kh(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:wm([...new Set(vh(e).concat(wh(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:J.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 Th(e,n){const r={};r.users=[];const i=n.split(".")[1];if(Ih(i))return{[i]:e[i]};{const{selectedUsers:a,deSelectedUsers:c}=e[i];return c==null||c?.length==0?a.forEach(l=>{l.isUserSelectionUpdated===!0&&r.users?.push(Ar(i,l.userId,l.isRoleSelected))}):c.forEach(l=>{r.users?.push(Ar(i,l.userId,l.isRoleSelected))}),{users:r.users}}}const Ih=e=>ch.includes(e);function Ar(e,n,r){switch(e){case"apAnalyst":return{isZeni:!0,role:J.toUserRoleType("ap_analyst"),userId:n,isSelected:r};case"taxLead":return{isZeni:!0,role:J.toUserRoleType("tax_lead"),userId:n,isSelected:r};case"customerSuccessManager":return{isZeni:!0,role:J.toUserRoleType("customer_success_manager"),userId:n,isSelected:r};default:return{isZeni:!0,role:e,userId:n,isSelected:r}}}const Ph=(e,n,r,i)=>{const a=J.dateNow().subtract(1,"month").format(lh),c=J.dateNow().startOf("month").subtract(1,"day"),l=r?.isSame(c)===!0&&i?.isAfter(r);return e?n?eh.replace("__month__",a):th.replace("__month__",a):l===!0?oh:nh.replace("__month__",a)},Lh=({enableCompanyMonthEndReportBtn:e,isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,handleMonthEndReportPageClick:a})=>{const c=J.dateNow().startOf("month").subtract(1,"day"),l=r?.isSame(c)===!0&&i?.isAfter(r),d=e?n?ih:sh:l===!0?null:rh;return d!=null?o.jsxRuntimeExports.jsx(t.Tooltip,{display:"block",placement:"bottom",maxWidth:"250",title:d,enterDelay:600,children:o.jsxRuntimeExports.jsx(Ns,{isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,enableCompanyMonthEndReportBtn:e,isExpenseAutomationEnabledForUser:!0,handleMonthEndReportPageClick:a})}):o.jsxRuntimeExports.jsx(Ns,{isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,enableCompanyMonthEndReportBtn:e,isExpenseAutomationEnabledForUser:!0,handleMonthEndReportPageClick:a})};function Ah({companyNameSticky:e,sortConfig:n,isProductVerticalsColumnVisible:r=!1,isRealmIdColumnVisible:i=!1,onColumnSortConfigChanged:a}){const c=t.useWindowSizeContext(),[l,d]=p.useState(o.cloneDeep(zt)),u=l.filter(x=>x.key==="productVerticals"?r:x.key==="realmId"?i:!0);p.useEffect(()=>{const x=[...l];for(const f of x)f.key===n.sortKey?f.sortOrder=n.sortOrder:f.sortOrder="ascending";d(x)},[n.sortKey,n.sortOrder]);const m=(x,f)=>{let h=f;n.sortKey===x&&(h=f==="ascending"?"descending":"ascending"),a(x,h)};return o.jsxRuntimeExports.jsx(Nh,{height:io,children:u.map(x=>o.jsxRuntimeExports.jsxs(Mh,{companyNameSticky:e&&x.key==="companyName",sortDataValue:n.sortKey,actualDataValue:x.key,wrapperWidth:x.width,hasLeadingGap:x.key==="productVerticals"||x.key==="realmId"||x.key==="taxLead",windowSize:c,children:[o.jsxRuntimeExports.jsxs(_h,{nonSortable:x.key==="realmId"||x.key==="productVerticals",onClick:()=>{x.key==="realmId"||x.key==="productVerticals"||m(J.toManagementSortKeyType(x.key),x.sortOrder)},children:[o.jsxRuntimeExports.jsx(t.ExtraSmallRegular,{children:x.value}),x.key==="realmId"||x.key==="productVerticals"?null:o.jsxRuntimeExports.jsx(Oh,{sortDataValue:n.sortKey,headerdata:x,children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:12,height:12})})]}),o.jsxRuntimeExports.jsx(Fh,{isVisible:n.sortKey===x.key&&x.key!=="status",children:o.jsxRuntimeExports.jsx(zh,{onClick:()=>m("status","ascending")})})]},x.key))})}const Dh=p.memo(Ah),Oh=s.div`
|
|
1177
1177
|
display: flex;
|
|
1178
1178
|
align-items: center;
|
|
1179
1179
|
transform: ${e=>e.sortDataValue===e.headerdata.key&&e.headerdata.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
@@ -1213,7 +1213,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1213
1213
|
display: flex;
|
|
1214
1214
|
align-items: center;
|
|
1215
1215
|
padding-top: 2px;
|
|
1216
|
-
`,
|
|
1216
|
+
`,_h=s(t.StandardRegular)`
|
|
1217
1217
|
display: flex;
|
|
1218
1218
|
cursor: ${e=>e.nonSortable===!0?"default":"pointer"};
|
|
1219
1219
|
gap: 5px;
|
|
@@ -1222,7 +1222,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1222
1222
|
color: ${e.theme.colors.primary};
|
|
1223
1223
|
}
|
|
1224
1224
|
`}
|
|
1225
|
-
`,
|
|
1225
|
+
`,Bh=({companyNameSticky:e,totalMRRAmount:n,totalARRAmount:r,isProductVerticalsColumnVisible:i=!1,isRealmIdColumnVisible:a=!1})=>{const c=t.useWindowSizeContext(),l=zt,d=l.find(m=>m.key==="productVerticals")?.width??new t.ResponsiveSized(360,360),u=l.find(m=>m.key==="realmId")?.width??new t.ResponsiveSized(120,120);return o.jsxRuntimeExports.jsxs(Wh,{className:"totalMRR",children:[o.jsxRuntimeExports.jsx(Vh,{companyNameSticky:e,width:l[0].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[1].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[2].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[3].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[4].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[5].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[6].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[7].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[8].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[9].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[10].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[11].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[12].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[13].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[14].width,windowSize:c}),o.jsxRuntimeExports.jsx(Be,{width:l[15].width,windowSize:c,children:o.jsxRuntimeExports.jsx(t.LargeMedium,{children:n})}),o.jsxRuntimeExports.jsx(Be,{width:l[16].width,windowSize:c,children:o.jsxRuntimeExports.jsx(t.LargeMedium,{children:r})}),i?o.jsxRuntimeExports.jsx(Be,{width:d,windowSize:c}):null,a?o.jsxRuntimeExports.jsx(Be,{width:u,windowSize:c}):null]})},Wh=s(t.LargeMedium)`
|
|
1226
1226
|
display: flex;
|
|
1227
1227
|
padding: 15px ${t.Space.sp4} 15px ${t.Space.sp0};
|
|
1228
1228
|
align-items: center;
|
|
@@ -1244,11 +1244,11 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1244
1244
|
flex: 1 1 auto;
|
|
1245
1245
|
gap: ${t.Space.sp3};
|
|
1246
1246
|
box-sizing: border-box;
|
|
1247
|
-
`,
|
|
1247
|
+
`,Be=s.div`
|
|
1248
1248
|
width: ${e=>e.width.valuePx(e.windowSize)};
|
|
1249
1249
|
display: flex;
|
|
1250
1250
|
justify-content: start;
|
|
1251
|
-
`,{collaboration:{threads:{placeholder:{addANewComment:Uh,replyAComment:Hh},tooltip:{resolveComment:Kh,unResolveComment:Gh}}},dateFormat:{analytics:{YYYYDashMMDashDDFormat:Dr}},common:{texts:{comments:Yh}}}=t.appLocale.getLocalizedStrings(),Zh={managementRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},Xh=({managementView:e,companiesExcludedFromMonthEndReport:n,showDetailsPageLink:r=!0,loggedInUser:i,loggedInUserRole:a,expenseAutomationEnabledCompanies:c,onColumnSortConfigChanged:l,changeHandlers:d,onCompanyNameClicked:u,onTaskIconClicked:m,onPassportIconClicked:x,onScroll:f,onViewDetailsLinkClicked:h,onMonthEndReportPageClick:S,showMonthEndReportHistoricData:j,initialOpenThreadRequest:g,isProductVerticalsColumnVisible:b=!1,onProductVerticalsChanged:C,isRealmIdColumnVisible:y=!1,realmIdUpdateStatusByCompanyId:E,onRealmIdReset:v,onRealmIdUpdate:$})=>{const I=t.useWindowSizeContext(),w=p.useRef(null),[T,z]=p.useState(null),[
|
|
1251
|
+
`,{collaboration:{threads:{placeholder:{addANewComment:Uh,replyAComment:Hh},tooltip:{resolveComment:Kh,unResolveComment:Gh}}},dateFormat:{analytics:{YYYYDashMMDashDDFormat:Dr}},common:{texts:{comments:Yh}}}=t.appLocale.getLocalizedStrings(),Zh={managementRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},Xh=({managementView:e,companiesExcludedFromMonthEndReport:n,showDetailsPageLink:r=!0,loggedInUser:i,loggedInUserRole:a,expenseAutomationEnabledCompanies:c,onColumnSortConfigChanged:l,changeHandlers:d,onCompanyNameClicked:u,onTaskIconClicked:m,onPassportIconClicked:x,onScroll:f,onViewDetailsLinkClicked:h,onMonthEndReportPageClick:S,showMonthEndReportHistoricData:j,initialOpenThreadRequest:g,isProductVerticalsColumnVisible:b=!1,onProductVerticalsChanged:C,isRealmIdColumnVisible:y=!1,realmIdUpdateStatusByCompanyId:E,onRealmIdReset:v,onRealmIdUpdate:$})=>{const I=t.useWindowSizeContext(),w=p.useRef(null),[T,z]=p.useState(null),[_,H]=p.useState(null),{setOpenThread:U,setRequestToOpenThread:K,requestToOpenThread:W,isLoading:R}=p.useContext(t.ThreadsContext);p.useEffect(()=>{g!=null&&e.fetchState==="Completed"&&R===!1&&K(g)},[g,e.fetchState,R,K]);const[A,B]=p.useState(void 0),P=p.useRef(null),k=p.useRef([]),N=!(I==="small"||I==="medium-compact"),{uiState:V,totalAnnualRecurringRevenue:ee,totalMonthlyRecurringRevenue:Y}=e,Z=V.scrollYOffset??0,Q=p.useCallback((G,ie,ae)=>{const me=e.companies.findIndex(D=>D.company.company.companyInfo.companyId===G),je=zt.findIndex(D=>D.key===ie);me!==-1&&je!==-1&&(k.current[me]==null?k.current[me]=[ae]:k.current[me][je]=ae)},[e.companies]),F=p.useCallback(G=>{let ie=e.companies[G].company.company.companyInfo.name.length;const ae=e.companies[G].company.company.parentSubsidiaryInfo;return ae.parentInfo?ie+=10:ae.subsidiaryInfo&&(ie+=15),ie>lo?De+32:De},[e.companies]),ue=p.useCallback(()=>{P.current=null,K(null)},[K]);p.useEffect(()=>{w.current&&w.current.resetAfterIndex(0)},[e]),p.useEffect(()=>{if(W!=null&&T!=null){const{companyId:G,entityType:ie}=W,[ae,me]=ie.split("."),je=e.companies.findIndex(xe=>xe.company.company.companyInfo.companyId===G),D=zt.findIndex(xe=>xe.key===me);je!==-1&&!(T.visibleStartIndex<=je&&T.visibleStopIndex>=je)&&w.current?.scrollToItem(je,"center"),setTimeout(()=>{const L=k.current[je]?.[D];L!=null&&(P.current={companyId:G,target:L});const ge=k.current[je]?.[0]?.getBoundingClientRect().bottom,Te=k.current[je]?.[0]?.getBoundingClientRect().top;if(ge!=null&&Te!=null&&(window.innerHeight>=ge&&window.innerHeight>=Te||Te<0)){const M=k.current[je][D];M!=null&&(P.current={companyId:G,target:M}),k.current[je][D]?.scrollIntoView({block:"center",behavior:"auto"})}},0);const le=setInterval(()=>{const xe=k.current[je]?.[D]?.getBoundingClientRect().left,L=k.current[je]?.[D]?.getBoundingClientRect().right,ge=k.current[je]?.[D]?.offsetWidth;if(P.current?.companyId===G&&xe!=null&&ge!=null&&L!=null&&(xe<window.innerWidth-ge||L<window.innerWidth)){clearInterval(le);const Te=W.threadId,M=W.onThreadShownCallback;Te&&(K(null),U(W.threadId),M?.())}},500);setTimeout(()=>{clearInterval(le),K(null)},2e3)}},[W,T,U,K]);const q=p.useMemo(()=>({isProductVerticalsColumnVisible:b,isRealmIdColumnVisible:y,makeCompanyNameSticky:N,uiState:V,totalAnnualRecurringRevenue:ee,totalMonthlyRecurringRevenue:Y,onColumnSortConfigChanged:l}),[b,y,N,V,ee,Y,l]);return o.jsxRuntimeExports.jsx(qh,{children:o.jsxRuntimeExports.jsxs(Fa.Provider,{value:q,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:G,width:ie})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:G,innerElementType:_a,itemCount:e.companies.length,itemSize:F,onItemsRendered:ae=>z(ae),itemData:{managementView:e,loggedInUser:i,loggedInUserRole:a,showDetailsPageLink:r,makeCompanyNameSticky:N,companiesExcludedFromMonthEndReport:n,addThreadRequestThreadId:A,expenseAutomationEnabledCompanies:c,targetElement:P.current?.target,resetTargetElementFromNavigation:ue,setElementRef:Q,onCompanyNameClicked:u,onPassportIconClicked:x,onTaskIconClicked:m,onMonthEndReportPageClick:S,setAddThreadRequestThreadId:B,changeHandlers:d,setNoteData:H,onViewDetailsLinkClicked:h,showMonthEndReportHistoricData:j,isProductVerticalsColumnVisible:b,onProductVerticalsChanged:C,isRealmIdColumnVisible:y,realmIdUpdateStatusByCompanyId:E,onRealmIdReset:v,onRealmIdUpdate:$},width:ie,ref:w,overscanCount:ao,onScroll:({scrollOffset:ae})=>{f?.(ae)},initialScrollOffset:Z??0,children:Qh})}),_!=null?o.jsxRuntimeExports.jsx(ot.RoomProvider,{id:_.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${_.companyName} ${Yh}`,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:Uh,replyComposerPlaceholder:Hh,threadResolve:Kh,threadUnResolve:Gh},onThreadClick:G=>null,onCloseAllThreadsDrawer:()=>H(null)})}):null]})})},Fa=p.createContext(void 0),Qh=({index:e,style:n,data:r})=>{const i=t.useWindowSizeContext(),{loggedInUserRole:a,showDetailsPageLink:c,addThreadRequestThreadId:l,targetElement:d,setNoteData:u,managementView:m,resetTargetElementFromNavigation:x,setElementRef:f,companiesExcludedFromMonthEndReport:h,makeCompanyNameSticky:S,changeHandlers:j,expenseAutomationEnabledCompanies:g,onCompanyNameClicked:b,onPassportIconClicked:C,onTaskIconClicked:y,onMonthEndReportPageClick:E,onViewDetailsLinkClicked:v,setAddThreadRequestThreadId:$,showMonthEndReportHistoricData:I,isProductVerticalsColumnVisible:w,onProductVerticalsChanged:T,isRealmIdColumnVisible:z,realmIdUpdateStatusByCompanyId:_,onRealmIdReset:H,onRealmIdUpdate:U}=r,K=m.companies[e],{companyId:W}=K.company.company.companyInfo,R=g.includes(W);return o.jsxRuntimeExports.jsx(eg,{style:{...n,width:"fit-content",minWidth:"100%",padding:`${t.Space.sp0} ${Zh.managementRightPadding.valuePx(i)} ${t.Space.sp3} ${t.Space.sp0}`},children:o.jsxRuntimeExports.jsx(ph,{onViewDetailsLinkClicked:v,showDetailsPageLink:c,loggedInUserRole:a,addThreadRequestThreadId:l,targetElementFromNavigation:d,resetTargetElementFromNavigation:x,setNoteData:u,setElementRef:f,isExpenseAutomationEnabledForUser:R,totalHeight:typeof n.height=="number"?n.height:De,changeHandlers:j,companyView:m.companies[e],hasMonthEndEmailHistory:m.companies[e].hasMonthEndEmailHistory,allUsers:m.zeniUsers.values,companyNameSticky:S,onCompanyNameClicked:b,onPassportIconClicked:C,onTaskIconClicked:y,onMonthEndReportPageClick:E,setAddThreadRequestThreadId:$,companiesExcludedFromMonthEndReport:h,showMonthEndReportHistoricData:I,isProductVerticalsColumnVisible:w,onProductVerticalsChanged:T,isRealmIdColumnVisible:z,realmIdUpdateFetchState:_?.[W],onRealmIdReset:H,onRealmIdUpdate:U})},W)},_a=p.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:c,uiState:l,totalAnnualRecurringRevenue:d,totalMonthlyRecurringRevenue:u,onColumnSortConfigChanged:m,isProductVerticalsColumnVisible:x,isRealmIdColumnVisible:f}=p.useContext(Fa);return o.jsxRuntimeExports.jsxs(Jh,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(Dh,{companyNameSticky:c,onColumnSortConfigChanged:m,isProductVerticalsColumnVisible:x,isRealmIdColumnVisible:f,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),o.jsxRuntimeExports.jsx(tg,{children:r}),o.jsxRuntimeExports.jsx(Bh,{companyNameSticky:c,totalMRRAmount:t.amountToString("0,0",u),totalARRAmount:t.amountToString("0,0",d),isProductVerticalsColumnVisible:x,isRealmIdColumnVisible:f})]})});_a.displayName="Management list view inner element type";const qh=s.div`
|
|
1252
1252
|
/** Subtract top so list can occupy remaining available height */
|
|
1253
1253
|
height: calc(100vh - 110px);
|
|
1254
1254
|
max-width: 99.9%;
|
|
@@ -1278,7 +1278,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1278
1278
|
height: calc(100vh - 45px);
|
|
1279
1279
|
overflow-y: hidden;
|
|
1280
1280
|
background-color: ${e=>e.theme.colors.grey4};
|
|
1281
|
-
`,gg=({companiesExcludedFromMonthEndReport:e,headerData:n,headerActions:r,managementPageActions:i,managementPageData:a,expenseAutomationEnabledCompanies:c,initialOpenThreadRequest:l})=>{const{managementView:d,loggedInUser:u,loggedInUserRole:m,realmIdUpdateStatusByCompanyId:x,showDetailsPageLink:f}=a,h=Ta(),S=Ad(),{onColumnSortConfigChanged:j,changeHandlers:g,onScroll:b,onViewDetailsLinkClicked:C,onCockpitReloadData:y,onCompanyNameClicked:E,onPassportIconClicked:v,onTaskIconClicked:$,onFiltersChange:I,onMonthEndReportPageClick:w,showMonthEndReportHistoricData:T,onProductVerticalsChanged:z,onRealmIdReset:
|
|
1281
|
+
`,gg=({companiesExcludedFromMonthEndReport:e,headerData:n,headerActions:r,managementPageActions:i,managementPageData:a,expenseAutomationEnabledCompanies:c,initialOpenThreadRequest:l})=>{const{managementView:d,loggedInUser:u,loggedInUserRole:m,realmIdUpdateStatusByCompanyId:x,showDetailsPageLink:f}=a,h=Ta(),S=Ad(),{onColumnSortConfigChanged:j,changeHandlers:g,onScroll:b,onViewDetailsLinkClicked:C,onCockpitReloadData:y,onCompanyNameClicked:E,onPassportIconClicked:v,onTaskIconClicked:$,onFiltersChange:I,onMonthEndReportPageClick:w,showMonthEndReportHistoricData:T,onProductVerticalsChanged:z,onRealmIdReset:_,onRealmIdUpdate:H}=i,U=d.uiState.filterText,K=d.uiState.filters,W=d.fetchState==="Completed"&&d.zeniUsers.fetchState==="Completed";return r.filterActions&&(r.filterActions.getCategoryWiseOptions=()=>yg(d)),o.jsxRuntimeExports.jsxs(hg,{children:[o.jsxRuntimeExports.jsx(jt,{headerActions:{...r},headerData:{...n,filterData:{filterText:U,filters:K},companiesLoaded:W,selectedTabOption:"management",allTabOptions:f===void 0?n.allTabOptions??xt:void 0}}),o.jsxRuntimeExports.jsx(Sg,{changeHandlers:g,companiesExcludedFromMonthEndReport:e,expenseAutomationEnabledCompanies:c,initialOpenThreadRequest:l,isFilterApplied:K?.categories!=null,loggedInUser:u,loggedInUserRole:m,managementView:d,onClearFilter:()=>I?.("management",{}),onCockpitReloadData:y,onColumnSortConfigChanged:j,onCompanyNameClicked:E,onMonthEndReportPageClick:w,onPassportIconClicked:v,onScroll:b,onTaskIconClicked:$,onViewDetailsLinkClicked:C,showMonthEndReportHistoricData:T,isProductVerticalsColumnVisible:h,onProductVerticalsChanged:z,isRealmIdColumnVisible:S,realmIdUpdateStatusByCompanyId:x,onRealmIdReset:_,onRealmIdUpdate:H})]})},Sg=({managementView:e,showDetailsPageLink:n=!0,loggedInUser:r,companiesExcludedFromMonthEndReport:i,expenseAutomationEnabledCompanies:a,initialOpenThreadRequest:c,isFilterApplied:l,loggedInUserRole:d,onColumnSortConfigChanged:u,changeHandlers:m,onScroll:x,onViewDetailsLinkClicked:f,onCockpitReloadData:h,onCompanyNameClicked:S,onTaskIconClicked:j,onPassportIconClicked:g,onClearFilter:b,onMonthEndReportPageClick:C,showMonthEndReportHistoricData:y,isProductVerticalsColumnVisible:E,onProductVerticalsChanged:v,isRealmIdColumnVisible:$,realmIdUpdateStatusByCompanyId:I,onRealmIdReset:w,onRealmIdUpdate:T})=>{const z=t.useWindowSizeContext();return e.fetchState==="Error"||e.zeniUsers.fetchState==="Error"?o.jsxRuntimeExports.jsx(Wt,{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(mg,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})}):e.companies.length===0?l?o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:rg,emptySearchTextSecondLine:Or,filtersApplied:!0,onClearFilter:b}):o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:pg,emptySearchTextSecondLine:Or}):o.jsxRuntimeExports.jsx(xg,{windowSize:z,children:o.jsxRuntimeExports.jsx(sg,{showDetailsPageLink:n,onColumnSortConfigChanged:u,changeHandlers:m,onScroll:x,onViewDetailsLinkClicked:f,managementView:e,loggedInUser:r,loggedInUserRole:d,expenseAutomationEnabledCompanies:a,onCompanyNameClicked:S,onTaskIconClicked:j,onPassportIconClicked:g,onMonthEndReportPageClick:C,companiesExcludedFromMonthEndReport:i,showMonthEndReportHistoricData:y,initialOpenThreadRequest:c,isProductVerticalsColumnVisible:E,onProductVerticalsChanged:v,isRealmIdColumnVisible:$,realmIdUpdateStatusByCompanyId:I,onRealmIdReset:w,onRealmIdUpdate:T})})},yg=e=>{const n=e.zeniUsers.values,r=xa,{companies:i}=e;return r.reduce((a,c)=>{switch(c.value){case"companyGroupId":{if(i.length===0)return{...a,[c.value]:[]};const l=i[0].company.schema.companyGroup.map(d=>{const u=d;return{label:u.name,value:u.id}});return{...a,[c.value]:l}}case"statusCode":{if(i.length===0)return{...a,[c.value]:[]};const l=i[0].company.schema.status.map(d=>{const u=d;return{label:u.name,value:u.code}});return{...a,[c.value]:l}}case"taxStatusCode":{if(i.length===0)return{...a,[c.value]:[]};const l=i[0].company.schema.taxStatus.map(d=>{const u=d;return{label:u.name,value:u.code,avatar:""}});return{...a,[c.value]:l}}case"controllerUserIds":case"apAnalystUserIds":case"preparerUserIds":case"reviewerUserIds":case"taxLeadUserIds":case"customerSuccessManagerUserIds":{const l=n.map(d=>({label:d.firstName||d.lastName?`${d.firstName} ${d.lastName}`:d.email,value:d.userId,photo:d.photo,email:d.email}));return{...a,[c.value]:l}}case"plans":{const l=e.subscriptionPlansZeniSkus.map(d=>({label:d,value:d})).sort((d,u)=>d.label.localeCompare(u.label));return{...a,[c.value]:l}}case"annualRecurringRevenue":return{...a,[c.value]:yc};case"monthlyRecurringRevenue":return{...a,[c.value]:Us};case"customerSatisfaction":{const l=Object.values(Zo).map(d=>({label:d.name,value:d.id}));return{...a,[c.value]:l}}case"zeniSatisfaction":{const l=Object.values(Co).map(d=>({label:d.name,value:d.id}));return{...a,[c.value]:l}}case"productVerticals":{const l=Aa.map(d=>({label:{...ig,bookkeeping:lg,billPay:ag,reimbursement:dg,tax:ug,payroll:cg}[d],value:d}));return{...a,[c.value]:l}}default:return{...a,[c.value]:[]}}},{})},{cockpit:{taskManager:{header:fg}},common:Ut}=t.appLocale.getLocalizedStrings(),oo=[{key:"name",value:Ut.texts.name,sortOrder:"ascending",width:new t.ResponsiveSized(176,176),isThreadAllowed:!0},{key:"taskName",value:fg.taskName,sortOrder:"ascending",width:new t.ResponsiveSized(320,320),isThreadAllowed:!0},{key:"status",value:Ut.texts.status,sortOrder:"ascending",width:new t.ResponsiveSized(100,100),isThreadAllowed:!0},{key:"priority",value:Ut.texts.priority,sortOrder:"ascending",width:new t.ResponsiveSized(90,90),isThreadAllowed:!0},{key:"dueDate",value:Ut.texts.dueDate,sortOrder:"ascending",width:new t.ResponsiveSized(100,100),isThreadAllowed:!0},{key:"assignee",value:Ut.texts.assignee,sortOrder:"ascending",width:new t.ResponsiveSized(220,220),isThreadAllowed:!0},{key:"tags",value:Ut.texts.tags,sortOrder:"ascending",width:new t.ResponsiveSized(115,115),isThreadAllowed:!0},{key:"createdBy",value:Ut.texts.createdBy,sortOrder:"ascending",width:new t.ResponsiveSized(140,140),isThreadAllowed:!0}];oo.map(e=>e.key);function Cg({sortConfig:e,onColumnSortConfigChanged:n}){const r=t.useWindowSizeContext(),[i,a]=p.useState(o.cloneDeep(oo));p.useEffect(()=>{const l=[...i];for(const d of l)d.key===e.sortKey?d.sortOrder=e.sortOrder:d.sortOrder="ascending";a(l)},[e.sortKey,e.sortOrder]);const c=(l,d)=>{let u=d;e.sortKey===l&&(u=d==="ascending"?"descending":"ascending"),n(l,u)};return o.jsxRuntimeExports.jsx(bg,{height:io,children:i.map(l=>o.jsxRuntimeExports.jsxs(Rg,{sortDataValue:e.sortKey,actualDataValue:l.key,wrapperWidth:l.width,windowSize:r,children:[o.jsxRuntimeExports.jsxs(vg,{onClick:()=>c(J.toTaskManagerSortKeyType(l.key),l.sortOrder),children:[o.jsxRuntimeExports.jsx(t.ExtraSmallRegular,{children:l.value}),o.jsxRuntimeExports.jsx(jg,{sortDataValue:e.sortKey,headerdata:l,children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:12,height:12})})]}),o.jsxRuntimeExports.jsx(Eg,{isVisible:e.sortKey===l.key&&l.key!=="dueDate",children:o.jsxRuntimeExports.jsx($g,{onClick:()=>c("dueDate","ascending")})})]},l.key))})}const jg=s.div`
|
|
1282
1282
|
display: flex;
|
|
1283
1283
|
align-items: center;
|
|
1284
1284
|
transform: ${e=>e.sortDataValue===e.headerdata.key&&e.headerdata.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
@@ -1335,7 +1335,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1335
1335
|
&:hover {
|
|
1336
1336
|
color: ${e=>e.theme.colors.primary};
|
|
1337
1337
|
}
|
|
1338
|
-
`,{dateFormat:wg,common:{strings:{empty:Yn,hyphen:kg,plus:tn}}}=t.appLocale.getLocalizedStrings(),Tg=({totalHeight:e,task:n,addThreadRequestThreadId:r,setElementRef:i,setAddThreadRequestThreadId:a,onRowClick:c})=>{const l=t.useWindowSizeContext(),d=o.useTheme(),u=n.assignees.length>0?n.assignees[0]:void 0,m=u?.firstName!=null&&u?.lastName!=null?`${u.firstName} ${u.lastName}`:u?.email??Yn,{companyId:x,name:f}=n.company.companyInfo,h=n.createdByUser?.firstName!==null&&n.createdByUser?.lastName!=null?`${n.createdByUser.firstName} ${n.createdByUser.lastName}`:n.createdByUser?.email??Yn,S=n.assignees.length,j=n.task.id,{openThread:g,threads:b,addThread:C,removeThread:y,setOpenThread:E,setRequestToOpenThread:v}=p.useContext(t.ThreadsContext),$=g!==null?b.get(g):null,I=g?.includes(x)===!0,w=g!=null&&b.get(g)==null&&I,T=r!=null&&b.get(r)?.metadata.companyId===x,z=`cockpit_${x}`,
|
|
1338
|
+
`,{dateFormat:wg,common:{strings:{empty:Yn,hyphen:kg,plus:tn}}}=t.appLocale.getLocalizedStrings(),Tg=({totalHeight:e,task:n,addThreadRequestThreadId:r,setElementRef:i,setAddThreadRequestThreadId:a,onRowClick:c})=>{const l=t.useWindowSizeContext(),d=o.useTheme(),u=n.assignees.length>0?n.assignees[0]:void 0,m=u?.firstName!=null&&u?.lastName!=null?`${u.firstName} ${u.lastName}`:u?.email??Yn,{companyId:x,name:f}=n.company.companyInfo,h=n.createdByUser?.firstName!==null&&n.createdByUser?.lastName!=null?`${n.createdByUser.firstName} ${n.createdByUser.lastName}`:n.createdByUser?.email??Yn,S=n.assignees.length,j=n.task.id,{openThread:g,threads:b,addThread:C,removeThread:y,setOpenThread:E,setRequestToOpenThread:v}=p.useContext(t.ThreadsContext),$=g!==null?b.get(g):null,I=g?.includes(x)===!0,w=g!=null&&b.get(g)==null&&I,T=r!=null&&b.get(r)?.metadata.companyId===x,z=`cockpit_${x}`,_=p.useCallback(()=>{g?.includes(t.NEW_THREAD_SUFFIX)===!0&&y(g),r!=null&&a(void 0)},[r,g,y,a]),H=R=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:R.isElementThreadOpen??!1,isElementThreadPresent:R.isElementThreadPresent??!1,itemKey:R.itemKey,elementThreadId:R.elementThreadId??"",roomId:z,addThreadRequestThreadId:r,openThreadId:g,threadStyle:R.threadStyle,openThreadMetadata:$?.metadata??null,onElementClick:K,onAddThreadClick:W}),U=p.useCallback(R=>{if(R===g)E(null);else if(b.has(R))E(R);else if(R.includes(t.NEW_THREAD_SUFFIX)){const[A,B]=R.replace(t.NEW_THREAD_SUFFIX,"").split("."),P=co(Bt(A),J.toTaskManagerSortKeyType(B),x,f,j);C(R,{type:"thread",visibility:"public",id:R,roomId:z,createdAt:new Date,updatedAt:new Date,comments:[],metadata:P,resolved:!1}),E(R)}},[g,b,E,x,f,j,C,z]),K=p.useCallback((R,A,B=!1)=>{const P=oo.find(k=>k.key===A);if(v(null),P!=null&&(R.type==="contextmenu"||B===!0)){if(P.isThreadAllowed===!1)return;_(),R.preventDefault(),R.stopPropagation();const k=t.toCollaborationEntityType({tab:"taskManager",key:P.key}),N=[...t.getFilteredThreads(b,{entityType:k,entityId:j,companyId:x},"both")],V=N.length>0&&N[0].length>0?N[0][0]:Le("taskManager",P.key,x+tn+j);b.has(V)?U(V):r===V?a(void 0):(a(V),E(null))}},[b,j,x,r,U,a,E,v,_]),W=p.useCallback((R,A)=>{R.stopPropagation();const B=Le("taskManager",A,x+tn+j);a(void 0),U(B)},[x,j,a,U]);return o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{v(null),r!=null&&(a(void 0),r.includes(t.NEW_THREAD_SUFFIX)&&y(r))},children:o.jsxRuntimeExports.jsx(Ig,{onClick:()=>c(n.company.companyInfo.primaryEmailDomain,n.task.id),windowSize:l,isThreadOpen:I||T,totalHeight:e,isCreationInProgress:w,children:oo.map((R,A)=>{const B=t.toCollaborationEntityType({tab:"taskManager",key:R.key}),P=oo.length-2<=A,k=[...t.getFilteredThreads(b,{entityType:B,entityId:j,companyId:x},"both")],N=k.length>0&&k[0].length>0?k[0][0]:Le("taskManager",R.key,x+tn+j),V=b.get(N),ee=V!=null&&V.resolved===!1,Y=N===g,Z=Q=>J.allTaskPriority.find(F=>F.code===Q)?.name??Yn;switch(R.key){case"name":return o.jsxRuntimeExports.jsxs(At,{ref:Q=>{i(x,R.key,Q)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:ne,onContextMenu:Q=>K(Q,R.key),children:[o.jsxRuntimeExports.jsx(Pg,{children:n.company.companyInfo.name}),H({isElementThreadOpen:Y,isElementThreadPresent:ee,itemKey:R.key,elementThreadId:N,threadStyle:P?{right:t.Space.sp0}:void 0})]},N);case"taskName":return o.jsxRuntimeExports.jsxs(At,{ref:Q=>{i(x,R.key,Q)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:ne,onContextMenu:Q=>K(Q,R.key),children:[o.jsxRuntimeExports.jsx(t.StandardRegular,{children:n.task.name}),H({isElementThreadOpen:Y,isElementThreadPresent:ee,itemKey:R.key,elementThreadId:N,threadStyle:P?{right:t.Space.sp0}:void 0})]},N);case"status":return o.jsxRuntimeExports.jsxs(At,{ref:Q=>{i(x,R.key,Q)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:ne,onContextMenu:Q=>K(Q,R.key),children:[t.getRichLabel(n.task.status.code,d),H({isElementThreadOpen:Y,isElementThreadPresent:ee,itemKey:R.key,elementThreadId:N,threadStyle:P?{right:t.Space.sp0}:void 0})]},N);case"priority":return o.jsxRuntimeExports.jsxs(At,{ref:Q=>{i(x,R.key,Q)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:ne,onContextMenu:Q=>K(Q,R.key),children:[o.jsxRuntimeExports.jsxs(Ag,{children:[o.jsxRuntimeExports.jsx(Dg,{color:t.getLabelColor(n.task.priority.code,d)}),o.jsxRuntimeExports.jsx(t.StandardRegular,{children:Z(n.task.priority.code)})]}),H({isElementThreadOpen:Y,isElementThreadPresent:ee,itemKey:R.key,elementThreadId:N,threadStyle:P?{right:t.Space.sp0}:void 0})]},N);case"dueDate":return o.jsxRuntimeExports.jsxs(At,{ref:Q=>{i(x,R.key,Q)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:ne,onContextMenu:Q=>K(Q,R.key),children:[o.jsxRuntimeExports.jsx(t.StandardRegular,{children:n.task.dueDate!=null?n.task.dueDate.format(wg.visual.MMMDCommaYYYYformat):kg}),H({isElementThreadOpen:Y,isElementThreadPresent:ee,itemKey:R.key,elementThreadId:N,threadStyle:P?{right:t.Space.sp0}:void 0})]},N);case"assignee":return o.jsxRuntimeExports.jsxs(At,{ref:Q=>{i(x,R.key,Q)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:ne,onContextMenu:Q=>K(Q,R.key),children:[o.jsxRuntimeExports.jsx(t.ZeniAvatar,{personBasic:u,styles:{width:t.Space.sp4,height:t.Space.sp4}}),o.jsxRuntimeExports.jsx(Nr,{children:m}),S>1?o.jsxRuntimeExports.jsx(Lg,{children:o.jsxRuntimeExports.jsx(t.SmallRegular,{children:`${tn}${S-1}`})}):null,H({isElementThreadOpen:Y,isElementThreadPresent:ee,itemKey:R.key,elementThreadId:N,threadStyle:P?{right:t.Space.sp0}:void 0})]},N);case"tags":return o.jsxRuntimeExports.jsxs(At,{ref:Q=>{i(x,R.key,Q)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:ne,onContextMenu:Q=>K(Q,R.key),children:[n.task.tagIds.length>0?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:t.getTagLabel(n.task.tagIds,n.tags)}):null,H({isElementThreadOpen:Y,isElementThreadPresent:ee,itemKey:R.key,elementThreadId:N,threadStyle:P?{right:t.Space.sp0}:void 0})]},N);case"createdBy":return o.jsxRuntimeExports.jsxs(At,{ref:Q=>{i(x,R.key,Q)},columnWidth:R.width,windowSize:l,isThreadAllowed:R.isThreadAllowed,className:ne,onContextMenu:Q=>K(Q,R.key),children:[o.jsxRuntimeExports.jsx(t.ZeniAvatar,{personBasic:n.createdByUser,styles:{width:t.Space.sp4,height:t.Space.sp4}}),o.jsxRuntimeExports.jsx(Nr,{children:h}),H({isElementThreadOpen:Y,isElementThreadPresent:ee,itemKey:R.key,elementThreadId:N,threadStyle:P?{right:t.Space.sp0}:void 0})]},N);default:return null}})})})},Ig=s.div`
|
|
1339
1339
|
display: flex;
|
|
1340
1340
|
min-width: 100%;
|
|
1341
1341
|
flex-direction: row;
|
|
@@ -1422,7 +1422,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1422
1422
|
height: ${t.Space.sp3};
|
|
1423
1423
|
color: ${e=>e.color};
|
|
1424
1424
|
margin-right: ${t.Space.sp2};
|
|
1425
|
-
`,
|
|
1425
|
+
`,Ba=p.createContext(void 0),Wa=p.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{uiState:c,onColumnSortConfigChanged:l}=p.useContext(Ba);return o.jsxRuntimeExports.jsxs(Va,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(Cg,{onColumnSortConfigChanged:l,sortConfig:{sortKey:c.sortKey,sortOrder:c.sortOrder}}),o.jsxRuntimeExports.jsx(Mg,{children:r})]})});Wa.displayName="Task manager list view inner element type";const Og=({companyTaskManagerView:e,fetchNextItemsOnScroll:n,onColumnSortConfigChanged:r,onRowClick:i,initialOpenThreadRequest:a})=>{const{uiState:c,fetchState:l}=e,d=p.useRef(null),[u,m]=p.useState(null),x=p.useMemo(()=>({uiState:e.uiState,onColumnSortConfigChanged:r}),[e.uiState,r]),{setOpenThread:f,setRequestToOpenThread:h,requestToOpenThread:S,isLoading:j}=p.useContext(t.ThreadsContext);p.useEffect(()=>{a!=null&&e.fetchState==="Completed"&&j===!1&&h(a)},[a,e.fetchState,j,h]);const[g,b]=p.useState(void 0),C=p.useRef([]),y=p.useCallback(I=>e.tasksList[I].company.companyInfo.name.length>lo?De+32:De,[e.tasksList]),E=p.useCallback(I=>I<e.tasksList.length,[e.tasksList.length]),v=p.useCallback(()=>{c.from!=null&&l==="Completed"&&n()},[n,l,c.from]);p.useEffect(()=>{d.current&&d.current.resetAfterIndex(0)},[e]);const $=p.useCallback((I,w,T)=>{const z=e.tasksList.findIndex(H=>H.company.companyInfo.companyId===I),_=oo.findIndex(H=>H.key===w);z!==-1&&_!==-1&&(C.current[z]==null?C.current[z]=[T]:C.current[z][_]=T)},[e.tasksList]);return p.useEffect(()=>{if(S!=null&&u!=null){const{companyId:I,entityType:w}=S,[T,z]=w.split("."),_=e.tasksList.findIndex(W=>W.company.companyInfo.companyId===I),H=oo.findIndex(W=>W.key===z);_!==-1&&!(u.visibleStartIndex<=_&&u.visibleStopIndex>=_)&&d.current?.scrollToItem(_,"center"),setTimeout(()=>{const W=C.current[_]?.[0]?.getBoundingClientRect().bottom,R=C.current[_]?.[0]?.getBoundingClientRect().top;W!=null&&R!=null&&(window.innerHeight>=W&&window.innerHeight>=R||R<0)&&C.current[_][H]?.scrollIntoView({block:"center",behavior:"auto"})},0);const K=setInterval(()=>{const W=C.current[_]?.[H]?.getBoundingClientRect().left,R=C.current[_]?.[H]?.getBoundingClientRect().right,A=C.current[_]?.[H]?.offsetWidth;if(W!=null&&A!=null&&R!=null&&(W<window.innerWidth-A||R<window.innerWidth)){clearInterval(K);const B=S.threadId,P=S.onThreadShownCallback;B&&(h(null),f(S.threadId),P?.())}},500);setTimeout(()=>{clearInterval(K),h(null)},2e3)}},[S,u,f,h]),o.jsxRuntimeExports.jsx(Fg,{children:o.jsxRuntimeExports.jsx(Ba.Provider,{value:x,children:o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:I,width:w})=>o.jsxRuntimeExports.jsx(Va,{style:{height:I,width:w},children:o.jsxRuntimeExports.jsx(o.InfiniteLoader,{isItemLoaded:E,itemCount:e.tasksList.length+1,loadMoreItems:v,children:({onItemsRendered:T})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:I,innerElementType:Wa,itemCount:e.tasksList.length,itemSize:y,itemData:{companyTaskManagerView:e,addThreadRequestThreadId:g,setElementRef:$,setAddThreadRequestThreadId:b,onRowClick:i},width:w,ref:d,onItemsRendered:z=>{m(z),T(z)},overscanCount:ao,children:Ng})})})})})})},Ng=({index:e,style:n,data:r})=>{const i=r.companyTaskManagerView,{addThreadRequestThreadId:a,setElementRef:c,setAddThreadRequestThreadId:l,onRowClick:d}=r,u=i.tasksList[e];return o.jsxRuntimeExports.jsx(zg,{style:{...n,width:"fit-content",minWidth:"100%"},children:o.jsxRuntimeExports.jsx(Tg,{totalHeight:typeof n.height=="number"?n.height:De,addThreadRequestThreadId:a,setElementRef:c,setAddThreadRequestThreadId:l,task:u,onRowClick:d})},u.task.id)},Va=s.div``,Mg=s.div`
|
|
1426
1426
|
position: relative;
|
|
1427
1427
|
width: auto;
|
|
1428
1428
|
height: 100%;
|
|
@@ -1436,7 +1436,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1436
1436
|
min-height: 100%;
|
|
1437
1437
|
flex-direction: column;
|
|
1438
1438
|
width: 100%;
|
|
1439
|
-
`,{cockpit:{emptySearchTextSecondLine:
|
|
1439
|
+
`,{cockpit:{emptySearchTextSecondLine:_g,taskManager:{metrics:{totalTasks:Bg,openTasks:Wg,overdueTasks:Vg,closedTasks:Ug}}},common:{texts:{sorryWeCouldnTFindAnyResults:Hg}}}=t.appLocale.getLocalizedStrings(),Kg=({headerActions:e,headerData:n,isBirdsEyeViewEnabled:r,initialOpenThreadRequest:i,taskManagerPageData:a,taskManagerPageActions:c})=>{const{companyTaskManagerView:l}=a,{uiState:d}=l,{onCockpitReloadData:u,onFetchTaskManagerView:m,onRowClick:x}=c,f=l.fetchState==="Completed",{filters:h}=l.uiState,[S,j]=p.useState(l.uiState.filterText??""),g=()=>{m(d.from,d.sortKey,d.sortOrder,!0,d.filterText)},b=(E,v)=>{m(d.from,E,v,!1,d.filterText,h)},C=p.useRef(o.debounce(E=>m(d.from,d.sortKey,d.sortOrder,!1,E,h),500,{trailing:!0})).current,y=(E,v)=>{j(v);const $=v.trim();$.length>=2?C($):C("")};return e.filterActions&&(e.filterActions.getCategoryWiseOptions=()=>Yg(l)),o.jsxRuntimeExports.jsxs(Zg,{children:[o.jsxRuntimeExports.jsx(jt,{headerActions:{...e,filterActions:{...e.filterActions,onFilterTextChanged:y}},headerData:{...n,allTabOptions:n.allTabOptions??xt,selectedTabOption:"taskManager",companiesLoaded:f,filterData:{filterText:S,filters:h}}}),r?o.jsxRuntimeExports.jsx(qg,{metrics:l.metrics}):null,o.jsxRuntimeExports.jsx(Gg,{companyTaskManagerView:l,fetchNextItemsOnScroll:g,initialOpenThreadRequest:i,onCockpitReloadData:u,onColumnSortConfigChanged:b,onRowClick:x})]})},Gg=({companyTaskManagerView:e,fetchNextItemsOnScroll:n,initialOpenThreadRequest:r,onCockpitReloadData:i,onColumnSortConfigChanged:a,onRowClick:c})=>{const l=t.useWindowSizeContext();return e.fetchState==="Error"&&e.tasksList.length===0?o.jsxRuntimeExports.jsx(Wt,{selectedCockpitOption:"taskManager",onCockpitReloadData:i}):e.fetchState==="Not-Started"||e.fetchState==="In-Progress"&&e.tasksList.length===0?o.jsxRuntimeExports.jsx(Xg,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})}):e.fetchState==="Completed"&&e.tasksList.length===0?o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:Hg,emptySearchTextSecondLine:_g,filtersApplied:!1}):o.jsxRuntimeExports.jsx(Qg,{windowSize:l,children:o.jsxRuntimeExports.jsx(Og,{companyTaskManagerView:e,fetchNextItemsOnScroll:n,initialOpenThreadRequest:r,onColumnSortConfigChanged:a,onRowClick:c})})},Yg=e=>{const n=Ca,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 c=(e.companies??[]).map(l=>({label:l.companyInfo.name,value:l.companyInfo.companyId}));return{...i,[a.value]:c}}case"assignees":{const c=(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]:c}}case"status":return{...i,[a.value]:J.allTaskStatus.map(c=>({label:c.name,value:c.code}))};case"priority":return{...i,[a.value]:J.allTaskPriority.map(c=>({label:c.name,value:c.code}))};case"tag":{const c=Array.from(r.values()).map(l=>({label:l.name,value:l.tagId}));return{...i,[a.value]:c}}default:return{...i,[a.value]:[]}}},{})},Zg=s.div`
|
|
1440
1440
|
height: calc(100vh - 60px);
|
|
1441
1441
|
overflow-y: hidden;
|
|
1442
1442
|
display: flex;
|
|
@@ -1456,7 +1456,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1456
1456
|
flex: 1;
|
|
1457
1457
|
overflow: hidden;
|
|
1458
1458
|
padding: ${e=>`${t.Space.sp0} ${Ze.cockpitRightPadding.valuePx(e.windowSize)} ${t.Space.sp0} ${Ze.cockpitLeftPadding.valuePx(e.windowSize)}`};
|
|
1459
|
-
`,qg=({metrics:e})=>{const n=t.useWindowSizeContext();return o.jsxRuntimeExports.jsxs(Jg,{windowSize:n,children:[o.jsxRuntimeExports.jsxs(on,{children:[o.jsxRuntimeExports.jsxs(nn,{children:[o.jsxRuntimeExports.jsx(sn,{children:
|
|
1459
|
+
`,qg=({metrics:e})=>{const n=t.useWindowSizeContext();return o.jsxRuntimeExports.jsxs(Jg,{windowSize:n,children:[o.jsxRuntimeExports.jsxs(on,{children:[o.jsxRuntimeExports.jsxs(nn,{children:[o.jsxRuntimeExports.jsx(sn,{children:Bg}),o.jsxRuntimeExports.jsx(rn,{as:za})]}),o.jsxRuntimeExports.jsx(an,{children:e.total})]}),o.jsxRuntimeExports.jsxs(on,{children:[o.jsxRuntimeExports.jsxs(nn,{children:[o.jsxRuntimeExports.jsx(sn,{children:Wg}),o.jsxRuntimeExports.jsx(rn,{as:t.SvgClock})]}),o.jsxRuntimeExports.jsx(an,{children:e.open})]}),o.jsxRuntimeExports.jsxs(on,{children:[o.jsxRuntimeExports.jsxs(nn,{children:[o.jsxRuntimeExports.jsx(sn,{children:Vg}),o.jsxRuntimeExports.jsx(rn,{as:t.SvgWarning})]}),o.jsxRuntimeExports.jsx(an,{children:e.overdue})]}),o.jsxRuntimeExports.jsxs(on,{children:[o.jsxRuntimeExports.jsxs(nn,{children:[o.jsxRuntimeExports.jsx(sn,{children:Ug}),o.jsxRuntimeExports.jsx(rn,{as:t.SvgTickRoundFill})]}),o.jsxRuntimeExports.jsx(an,{children:e.closed})]})]})},Jg=s.div`
|
|
1460
1460
|
display: flex;
|
|
1461
1461
|
flex-direction: row;
|
|
1462
1462
|
gap: ${t.Space.sp4};
|
|
@@ -1562,7 +1562,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1562
1562
|
left: 19%;
|
|
1563
1563
|
position: absolute;
|
|
1564
1564
|
background-color: ${e=>e.theme.colors.primary};
|
|
1565
|
-
`,{dateFormat:Mr,timeFormat:f1,timeframe:Zn,common:kt}=t.appLocale.getLocalizedStrings(),Xn=e=>{if(e!=null){const n=J.dateNow();return Math.abs(n.diff(e,"days"))}};function Ko(e){if(e==null)return;const n=J.dateNow();if(Math.abs(n.diff(e,"days"))<=0)return`0 ${Zn.day}`;const[i,a]=e<n?[e,n]:[n,e],c=i.year(),l=i.month(),d=i.date(),u=a.year(),m=a.month(),x=a.date();let f=u-c,h=m-l,S=x-d;if(S<0){h--;const g=new Date(u,m,0);S+=g.getDate()}h<0&&(f--,h+=12);const j=[];return f>0&&j.push(`${f} ${f>1?kt.texts.years:kt.texts.years.slice(0,-1)}`),h>0&&j.push(`${h} ${h>1?kt.texts.months:kt.texts.months.slice(0,-1)}`),S>0&&j.push(`${S} ${S>1?Zn.day:Zn.day.slice(0,-1)}`),j.join(", ")}function Ga(e){if(e==null)return kt.strings.hyphen;const n=Math.floor(Number(e)/12),r=Number(e)%12,i=n>1?kt.texts.years:kt.texts.years.slice(0,-1),a=r>1?kt.texts.months:kt.texts.months.slice(0,-1);return n===0?`${e} ${a}`:r===0?`${n} ${i}`:`${n} ${i}, ${r} ${a}`}const Ya=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?Ko(J.zeniDate(e?.managementInfo.lastReportSentDate.toISOString())):void 0,dashboardLastVisit:e?.companyHealthMetric.customerLastDashboardVisit!=null?J.zeniDate(e?.companyHealthMetric.customerLastDashboardVisit.toISOString()).format(Mr.visual.MMMDCommaYYYYformat):void 0,companyEngagementMetricsUpdatedAt:e?.companyHealthMetric.companyEngagementMetricsUpdatedAt!=null?{date:J.zeniDate(e?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(Mr.visual.MMMDCommaYYYYformat),time:J.zeniDate(e?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(f1.hhmmAFormat)}:void 0,noOfVerticalsEnabled:e?.noOfProductVerticalsEnabled,renewalDate:e?.companyHealthMetric.subscriptionRenewalDate!=null?Ko(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}),{cockpit:{health:{header:zr}},common:{texts:{name:C1,churnProbability:j1,controller:b1,csManager:R1,lastUpdated:$1,runway:E1,nps:v1,csat:w1,lastReportSent:k1,subscriptionDate:T1,renewalDate:I1,group:P1,mrr:L1,externalServicesExposure:A1,productVerticals:D1}}}=t.appLocale.getLocalizedStrings(),no=[{key:"companyName",value:C1,sortOrder:"ascending",width:new t.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"churnProbability",value:j1,sortOrder:"ascending",width:new t.ResponsiveSized(380,380),isThreadAllowed:!0},{key:"controller",value:b1,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"customerSuccessManager",value:R1,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"lastEngagement",value:zr.lastEngagement,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"companyEngagementMetricsUpdatedAt",value:$1,sortOrder:"ascending",width:new t.ResponsiveSized(160,160),isThreadAllowed:!0},{key:"runway",value:E1,sortOrder:"ascending",width:new t.ResponsiveSized(220,220),isThreadAllowed:!0},{key:"netPromoterScore",value:v1,sortOrder:"ascending",width:new t.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"customerSatisfactionScore",value:w1,sortOrder:"ascending",width:new t.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"lastReportSent",value:k1,sortOrder:"ascending",width:new t.ResponsiveSized(250,250),isThreadAllowed:!0},{key:"dashboardLastSeen",value:zr.dashboardLastSeen,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"subscriptionDate",value:T1,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"renewalDate",value:I1,sortOrder:"ascending",width:new t.ResponsiveSized(180,180),isThreadAllowed:!0},{key:"group",value:P1,sortOrder:"ascending",width:new t.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:L1,sortOrder:"ascending",width:new t.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"externalProductServiceExposure",value:A1,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"productVerticals",value:D1,sortOrder:"ascending",width:new t.ResponsiveSized(360,360),isThreadAllowed:!0}];no.map(e=>e.key);const Za=e=>ce.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.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"}),ce.createElement("path",{d:"M11.0046 7L14.0046 5V11L11.0046 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),Xa=t.appLocale.getLocalizedStrings(),{common:{texts:{churnProbability:O1,is:N1}}}=Xa;function M1({companyView:e,healthView:n,companyNameSticky:r,totalHeight:i,addThreadRequestThreadId:a,setNoteData:c,setElementRef:l,setAddThreadRequestThreadId:d,onRowClick:u}){const m=t.useWindowSizeContext(),{common:{strings:{hyphen:x,backspace:f,space:h,colon:S,dot:j},settings:{notifications:{mode:{email:g}}}},cockpit:{health:{detailPage:{churnProbabilityTexts:{for:b,percent:C},notApplicable:y},common:{engagementTypes:E,labels:{lastEngagements:v,factorsThatDecreaseChurnProbability:$,factorsThatIncreaseChurnProbability:I}}}},dateFormat:w}=Xa,{companyInfo:{companyId:T,name:z},companyHealthMetric:B,controllers:H,managementInfo:{lastReportSentDate:U,customerSuccessManagerUserIds:K}}=e,W=Ya(e),A=n.zeniUsers.values.filter(L=>K.includes(L.userId)),_=`cockpit_${T}`,P="healthMonitor.notes",{threads:k,isLoading:N}=t.useFilteredThreads({entityType:P,companyId:T},!1),V={name:z,companyId:T,companyGroup:e.companyGroup!=null?e.companyGroup.find(L=>L.id===e.managementInfo.companyGroupId):void 0,monthlyRecurringRevenue:e.monthlyRecurringRevenue,productVerticals:B.verticalProductServices,runway:B.runway,churnProbabilityPercentage:B.churnProbabilityPercentage,netPromoterScore:B.netPromoterScore,customerSatisfactionScore:B.customerSatisfactionScore,controllers:H.map(L=>J.getUserName(L)),customerSuccessManagers:A.map(L=>J.getUserName(L)),lastReportSent:U!=null?J.zeniDate(U.toISOString()):void 0,subscriptionStartDate:B.subscriptionStartDate!=null?J.zeniDate(B.subscriptionStartDate.toISOString()).format(w.visual.MMMDCommaYYYYformat):void 0,renewalDate:B.subscriptionRenewalDate!=null?J.zeniDate(B.subscriptionRenewalDate.toISOString()):void 0,companyEngagementMetricsUpdatedAt:B.companyEngagementMetricsUpdatedAt,externalProductServiceExposure:B.externalProductServiceExposure},{openThread:ee,threads:Y,addThread:Z,removeThread:Q,setOpenThread:F,setRequestToOpenThread:ue}=p.useContext(t.ThreadsContext),q=p.useRef(null),G=ee!==null?Y.get(ee):null,ie=ee?.includes(T)===!0,ae=ee!=null&&Y.get(ee)==null&&ie,me=a!=null&&Y.get(a)?.metadata.companyId===T,je=p.useCallback(()=>{ee?.includes(t.NEW_THREAD_SUFFIX)===!0&&Q(ee),a!=null&&d(void 0)},[a,ee,Q,d]),D=p.useCallback(L=>{if(L===ee)F(null);else if(Y.has(L))F(L);else if(L.includes(t.NEW_THREAD_SUFFIX)){const[ge,Te]=L.replace(t.NEW_THREAD_SUFFIX,"").split("."),M=co(_t(ge),J.toHealthSortKeyType(Te),T,z);Z(L,{type:"thread",visibility:"public",id:L,roomId:_,createdAt:new Date,updatedAt:new Date,comments:[],metadata:M,resolved:!1}),F(L)}},[T,z,ee,Y,Z,F,_]),de=p.useCallback((L,ge,Te=!1)=>{const M=no.find(fe=>fe.key===ge);if(ue(null),M!=null&&(L.type==="contextmenu"||Te===!0)){if(M.isThreadAllowed===!1)return;je(),L.preventDefault(),L.stopPropagation();const fe=t.toCollaborationEntityType({tab:"healthMonitor",key:M.key}),se=[...t.getFilteredThreads(Y,{entityType:fe,companyId:T},"both")],te=se.length>0&&se[0].length>0?se[0][0]:Le("healthMonitor",M.key,T);Y.has(te)?D(te):a===te?d(void 0):(d(te),F(null))}},[Y,T,a,D,d,F,ue,je]),le=p.useCallback((L,ge)=>{L.stopPropagation();const Te=Le("healthMonitor",ge,T);d(void 0),D(Te)},[T,d,D]),xe=L=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:L.isElementThreadOpen??!1,isElementThreadPresent:L.isElementThreadPresent??!1,itemKey:L.itemKey,elementThreadId:L.elementThreadId??"",roomId:_,addThreadRequestThreadId:a,openThreadId:ee,threadStyle:L.threadStyle,openThreadMetadata:G?.metadata??null,onElementClick:de,onAddThreadClick:le});return o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{ue(null),a!=null&&(d(void 0),a.includes(t.NEW_THREAD_SUFFIX)&&Q(a))},children:o.jsxRuntimeExports.jsx(z1,{windowSize:m,isThreadOpen:ie||me,totalHeight:i,isCreationInProgress:ae,"data-testid":t.generateDataTestId("health-monitor-row",T),onClick:()=>u(V.companyId),children:no.map((L,ge)=>{const Te=t.toCollaborationEntityType({tab:"healthMonitor",key:L.key}),M=no.length-2<=ge,fe=[...t.getFilteredThreads(Y,{entityType:Te,companyId:T},"both")],se=fe.length>0&&fe[0].length>0?fe[0][0]:Le("healthMonitor",L.key,T),te=Y.get(se),we=te!=null&&te.resolved===!1,Se=se===ee,He=a===se,Ie=W.lastEngagements;switch(L.key){case"companyName":return o.jsxRuntimeExports.jsxs(W1,{companyNameSticky:r,columnWidth:L.width,windowSize:m,isThreadOpen:Se||He,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-company-name",T),onContextMenu:X=>de(X,L.key),ref:X=>{l(T,L.key,X)},children:[o.jsxRuntimeExports.jsxs(H1,{ref:q,"data-testid":t.generateDataTestId("health-monitor-row-company-name-text",T),children:[V.name,o.jsxRuntimeExports.jsx(t.ThreadComponent,{anchorRef:q,isElementThreadOpen:Se,roomId:_,openThreadId:ee,openThreadMetadata:G?.metadata??null})]}),o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`2px ${t.Space.sp2}`},title:"Notes",children:o.jsxRuntimeExports.jsxs(G1,{className:"notesIcon","data-testid":t.generateDataTestId("health-monitor-row-notes-icon",T),onClick:X=>{X.preventDefault(),X.stopPropagation(),c({roomId:_,companyId:T,companyName:z,entityType:P})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:k.length,isLoading:N}),o.jsxRuntimeExports.jsx(Y1,{})]})}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:we,itemKey:L.key,style:{left:t.Space.sp4},onElementClick:de}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Le("healthMonitor",L.key,T),addThreadRequestThreadId:a,itemKey:L.key,onAddThreadClick:le})]},se);case"productVerticals":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-product-verticals",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(Qa,{productVerticals:B.verticalProductServices,testIdSuffix:T}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"runway":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-runway",T),onContextMenu:X=>de(X,L.key),children:[V.runway!=null?J.isCompanyRunwayInfinite(V.runway)===!0?o.jsxRuntimeExports.jsx(Z1,{"data-testid":t.generateDataTestId("health-monitor-row-runway-infinity",T)}):Ga(V.runway.runwayMonths):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:x}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"churnProbability":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-churn-probability",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(K1,{"data-testid":t.generateDataTestId("health-monitor-row-churn-meter",T),children:o.jsxRuntimeExports.jsx(Ka,{percentage:V.churnProbabilityPercentage,barHeight:12})}),W.churnProbabilityPercentage!=null?o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`,textAlign:"left"},title:o.jsxRuntimeExports.jsxs(q1,{children:[o.jsxRuntimeExports.jsx(J1,{children:`${O1} ${b} ${e.companyInfo.name} ${N1} ${Math.round(W.churnProbabilityPercentage??0)}${C}${j}`}),e.companyHealthMetric.churnProbabilityReason.length!==0||e.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(Br,{children:[o.jsxRuntimeExports.jsxs(_r,{children:[I,S]}),o.jsxRuntimeExports.jsxs(Wr,{children:[e.companyHealthMetric.churnProbabilityReason.map((X,ke)=>o.jsxRuntimeExports.jsx(qn,{children:o.jsxRuntimeExports.jsx(Jn,{children:X.text})},`${o.nanoid()}_${ke}}`)),e.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((X,ke)=>o.jsxRuntimeExports.jsx(qn,{children:o.jsxRuntimeExports.jsx(Jn,{children:X.value})},`${o.nanoid()}_${ke}}`))]})]}):null,e.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(Br,{children:[o.jsxRuntimeExports.jsxs(_r,{children:[$,S]}),o.jsxRuntimeExports.jsx(Wr,{children:e.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((X,ke)=>o.jsxRuntimeExports.jsx(qn,{children:o.jsxRuntimeExports.jsx(Jn,{children:X.value})},`${o.nanoid()}_${ke}}`))})]}):null]}),children:o.jsxRuntimeExports.jsx(Q1,{"data-testid":t.generateDataTestId("health-monitor-row-churn-info-icon",T),style:{marginTop:t.Space.sp1,marginLeft:t.Space.sp1,marginRight:t.Space.sp0}})}):null,xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"customerSatisfactionScore":case"netPromoterScore":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId(`health-monitor-row-${L.key==="netPromoterScore"?"nps":"csat"}`,T),onContextMenu:X=>de(X,L.key),children:[V[L.key]!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(U1,{children:V[L.key]}),o.jsxRuntimeExports.jsx(V1,{children:f}),L.key==="netPromoterScore"?o.jsxRuntimeExports.jsxs(Fr,{children:[" ",hc," "]}):o.jsxRuntimeExports.jsxs(Fr,{children:[" ",gc," "]})]}):V.churnProbabilityPercentage!=null?y:x,xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"controller":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-controller",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(t.Tooltip,{enterDelay:600,style:{padding:`2px ${t.Space.sp2}`},title:V.controllers.join(", "),children:V.controllers[0]}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"customerSuccessManager":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-csm",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(t.Tooltip,{enterDelay:600,style:{padding:`2px ${t.Space.sp2}`,textAlign:"left"},maxWidth:"300px",title:V.customerSuccessManagers.join(", "),children:V.customerSuccessManagers[0]}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"lastReportSent":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-last-report-sent",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(Qn,{children:V.lastReportSent!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:Ko(V.lastReportSent)}),o.jsxRuntimeExports.jsx(t.SmallRegular,{children:V.lastReportSent.format(w.visual.MMMDCommaYYYYformat)})]}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:x})}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"renewalDate":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-renewal-date",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(Qn,{children:V.renewalDate!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:Ko(V.renewalDate)}),o.jsxRuntimeExports.jsx(t.SmallRegular,{children:V.renewalDate.format(w.visual.MMMDCommaYYYYformat)})]}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:x})}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"group":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-group",T),onContextMenu:X=>de(X,L.key),children:[V.companyGroup!=null?o.jsxRuntimeExports.jsx(X1,{"data-testid":t.generateDataTestId("health-monitor-row-group-badge",T),textColor:Oa[V.companyGroup.id],children:V.companyGroup.name.toUpperCase()}):x,xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-mrr",T),onContextMenu:X=>de(X,L.key),children:[t.amountToString("0,0",V.monthlyRecurringRevenue),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"externalProductServiceExposure":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-external-exposure",T),onContextMenu:X=>de(X,L.key),children:[V.externalProductServiceExposure!=null?V.externalProductServiceExposure.name:x,xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"lastEngagement":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-last-engagement",T),onContextMenu:X=>de(X,L.key),children:[Ie.length>0?o.jsxRuntimeExports.jsxs(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`},title:o.jsxRuntimeExports.jsxs(eS,{children:[o.jsxRuntimeExports.jsxs(tS,{children:[v,S]}),Ie.map((X,ke)=>o.jsxRuntimeExports.jsxs(oS,{children:[o.jsxRuntimeExports.jsxs(nS,{children:[X.type==="email"?o.jsxRuntimeExports.jsx(iS,{}):o.jsxRuntimeExports.jsx(aS,{}),o.jsxRuntimeExports.jsx(B1,{children:X.type==="email"?g:E.meeting})]}),o.jsxRuntimeExports.jsx(sS,{children:X.scheduledAt?.utc(!0).local().format(w.visual.MMMDCommaYYYYformat)??x})]},`${o.nanoid()}_${ke}}`))]}),children:[Ie[0].scheduledAt?.utc(!0).local().format(w.visual.MMMDCommaYYYYformat)??x,o.jsxRuntimeExports.jsxs(rS,{children:[Ie[0].type==="email"?o.jsxRuntimeExports.jsx(qa,{className:"engagement-email-icon"}):o.jsxRuntimeExports.jsx(Ja,{className:"engagement-meeting-icon"}),o.jsxRuntimeExports.jsxs(lS,{children:["Via",h,Ie[0].type==="email"?g:E.meeting]})]})]}):o.jsxRuntimeExports.jsx(t.StandardRegular,{children:x}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"dashboardLastSeen":case"subscriptionDate":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId(`health-monitor-row-${L.key==="dashboardLastSeen"?"dashboard-last-seen":"subscription-date"}`,T),onContextMenu:X=>de(X,L.key),children:[V.subscriptionStartDate??x,xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"companyEngagementMetricsUpdatedAt":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-engagement-updated",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(Qn,{children:V.companyEngagementMetricsUpdatedAt!=null?o.jsxRuntimeExports.jsx(t.LargeRegular,{children:Ko(V.companyEngagementMetricsUpdatedAt)}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:x})}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);default:return null}})})})}const Qa=({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(F1,{"data-testid":t.generateDataTestId("health-monitor-product-services",n),children:e.map((i,a)=>{const c=r(i.productServiceKey);if(c!=null){const l=n!=null&&n!==""?`${c.key}-${n}`:c.key;return o.jsxRuntimeExports.jsx(_1,{color:c.color,isEnabled:i.isEnabled,"data-testid":t.generateDataTestId("health-monitor-product-chip",l),children:c.key},`${o.nanoid()}_${a}`)}else return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{})})})},z1=s.div`
|
|
1565
|
+
`,{dateFormat:Mr,timeFormat:f1,timeframe:Zn,common:kt}=t.appLocale.getLocalizedStrings(),Xn=e=>{if(e!=null){const n=J.dateNow();return Math.abs(n.diff(e,"days"))}};function Ko(e){if(e==null)return;const n=J.dateNow();if(Math.abs(n.diff(e,"days"))<=0)return`0 ${Zn.day}`;const[i,a]=e<n?[e,n]:[n,e],c=i.year(),l=i.month(),d=i.date(),u=a.year(),m=a.month(),x=a.date();let f=u-c,h=m-l,S=x-d;if(S<0){h--;const g=new Date(u,m,0);S+=g.getDate()}h<0&&(f--,h+=12);const j=[];return f>0&&j.push(`${f} ${f>1?kt.texts.years:kt.texts.years.slice(0,-1)}`),h>0&&j.push(`${h} ${h>1?kt.texts.months:kt.texts.months.slice(0,-1)}`),S>0&&j.push(`${S} ${S>1?Zn.day:Zn.day.slice(0,-1)}`),j.join(", ")}function Ga(e){if(e==null)return kt.strings.hyphen;const n=Math.floor(Number(e)/12),r=Number(e)%12,i=n>1?kt.texts.years:kt.texts.years.slice(0,-1),a=r>1?kt.texts.months:kt.texts.months.slice(0,-1);return n===0?`${e} ${a}`:r===0?`${n} ${i}`:`${n} ${i}, ${r} ${a}`}const Ya=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?Ko(J.zeniDate(e?.managementInfo.lastReportSentDate.toISOString())):void 0,dashboardLastVisit:e?.companyHealthMetric.customerLastDashboardVisit!=null?J.zeniDate(e?.companyHealthMetric.customerLastDashboardVisit.toISOString()).format(Mr.visual.MMMDCommaYYYYformat):void 0,companyEngagementMetricsUpdatedAt:e?.companyHealthMetric.companyEngagementMetricsUpdatedAt!=null?{date:J.zeniDate(e?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(Mr.visual.MMMDCommaYYYYformat),time:J.zeniDate(e?.companyHealthMetric.companyEngagementMetricsUpdatedAt.toISOString()).format(f1.hhmmAFormat)}:void 0,noOfVerticalsEnabled:e?.noOfProductVerticalsEnabled,renewalDate:e?.companyHealthMetric.subscriptionRenewalDate!=null?Ko(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}),{cockpit:{health:{header:zr}},common:{texts:{name:C1,churnProbability:j1,controller:b1,csManager:R1,lastUpdated:$1,runway:E1,nps:v1,csat:w1,lastReportSent:k1,subscriptionDate:T1,renewalDate:I1,group:P1,mrr:L1,externalServicesExposure:A1,productVerticals:D1}}}=t.appLocale.getLocalizedStrings(),no=[{key:"companyName",value:C1,sortOrder:"ascending",width:new t.ResponsiveSized(392,392),isThreadAllowed:!0},{key:"churnProbability",value:j1,sortOrder:"ascending",width:new t.ResponsiveSized(380,380),isThreadAllowed:!0},{key:"controller",value:b1,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"customerSuccessManager",value:R1,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"lastEngagement",value:zr.lastEngagement,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"companyEngagementMetricsUpdatedAt",value:$1,sortOrder:"ascending",width:new t.ResponsiveSized(160,160),isThreadAllowed:!0},{key:"runway",value:E1,sortOrder:"ascending",width:new t.ResponsiveSized(220,220),isThreadAllowed:!0},{key:"netPromoterScore",value:v1,sortOrder:"ascending",width:new t.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"customerSatisfactionScore",value:w1,sortOrder:"ascending",width:new t.ResponsiveSized(120,120),isThreadAllowed:!0},{key:"lastReportSent",value:k1,sortOrder:"ascending",width:new t.ResponsiveSized(250,250),isThreadAllowed:!0},{key:"dashboardLastSeen",value:zr.dashboardLastSeen,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"subscriptionDate",value:T1,sortOrder:"ascending",width:new t.ResponsiveSized(200,200),isThreadAllowed:!0},{key:"renewalDate",value:I1,sortOrder:"ascending",width:new t.ResponsiveSized(180,180),isThreadAllowed:!0},{key:"group",value:P1,sortOrder:"ascending",width:new t.ResponsiveSized(148,148),isThreadAllowed:!0},{key:"monthlyRecurringRevenue",value:L1,sortOrder:"ascending",width:new t.ResponsiveSized(196,196),isThreadAllowed:!0},{key:"externalProductServiceExposure",value:A1,sortOrder:"ascending",width:new t.ResponsiveSized(270,270),isThreadAllowed:!0},{key:"productVerticals",value:D1,sortOrder:"ascending",width:new t.ResponsiveSized(360,360),isThreadAllowed:!0}];no.map(e=>e.key);const Za=e=>ce.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.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"}),ce.createElement("path",{d:"M11.0046 7L14.0046 5V11L11.0046 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),Xa=t.appLocale.getLocalizedStrings(),{common:{texts:{churnProbability:O1,is:N1}}}=Xa;function M1({companyView:e,healthView:n,companyNameSticky:r,totalHeight:i,addThreadRequestThreadId:a,setNoteData:c,setElementRef:l,setAddThreadRequestThreadId:d,onRowClick:u}){const m=t.useWindowSizeContext(),{common:{strings:{hyphen:x,backspace:f,space:h,colon:S,dot:j},settings:{notifications:{mode:{email:g}}}},cockpit:{health:{detailPage:{churnProbabilityTexts:{for:b,percent:C},notApplicable:y},common:{engagementTypes:E,labels:{lastEngagements:v,factorsThatDecreaseChurnProbability:$,factorsThatIncreaseChurnProbability:I}}}},dateFormat:w}=Xa,{companyInfo:{companyId:T,name:z},companyHealthMetric:_,controllers:H,managementInfo:{lastReportSentDate:U,customerSuccessManagerUserIds:K}}=e,W=Ya(e),A=n.zeniUsers.values.filter(L=>K.includes(L.userId)),B=`cockpit_${T}`,P="healthMonitor.notes",{threads:k,isLoading:N}=t.useFilteredThreads({entityType:P,companyId:T},!1),V={name:z,companyId:T,companyGroup:e.companyGroup!=null?e.companyGroup.find(L=>L.id===e.managementInfo.companyGroupId):void 0,monthlyRecurringRevenue:e.monthlyRecurringRevenue,productVerticals:_.verticalProductServices,runway:_.runway,churnProbabilityPercentage:_.churnProbabilityPercentage,netPromoterScore:_.netPromoterScore,customerSatisfactionScore:_.customerSatisfactionScore,controllers:H.map(L=>J.getUserName(L)),customerSuccessManagers:A.map(L=>J.getUserName(L)),lastReportSent:U!=null?J.zeniDate(U.toISOString()):void 0,subscriptionStartDate:_.subscriptionStartDate!=null?J.zeniDate(_.subscriptionStartDate.toISOString()).format(w.visual.MMMDCommaYYYYformat):void 0,renewalDate:_.subscriptionRenewalDate!=null?J.zeniDate(_.subscriptionRenewalDate.toISOString()):void 0,companyEngagementMetricsUpdatedAt:_.companyEngagementMetricsUpdatedAt,externalProductServiceExposure:_.externalProductServiceExposure},{openThread:ee,threads:Y,addThread:Z,removeThread:Q,setOpenThread:F,setRequestToOpenThread:ue}=p.useContext(t.ThreadsContext),q=p.useRef(null),G=ee!==null?Y.get(ee):null,ie=ee?.includes(T)===!0,ae=ee!=null&&Y.get(ee)==null&&ie,me=a!=null&&Y.get(a)?.metadata.companyId===T,je=p.useCallback(()=>{ee?.includes(t.NEW_THREAD_SUFFIX)===!0&&Q(ee),a!=null&&d(void 0)},[a,ee,Q,d]),D=p.useCallback(L=>{if(L===ee)F(null);else if(Y.has(L))F(L);else if(L.includes(t.NEW_THREAD_SUFFIX)){const[ge,Te]=L.replace(t.NEW_THREAD_SUFFIX,"").split("."),M=co(Bt(ge),J.toHealthSortKeyType(Te),T,z);Z(L,{type:"thread",visibility:"public",id:L,roomId:B,createdAt:new Date,updatedAt:new Date,comments:[],metadata:M,resolved:!1}),F(L)}},[T,z,ee,Y,Z,F,B]),de=p.useCallback((L,ge,Te=!1)=>{const M=no.find(fe=>fe.key===ge);if(ue(null),M!=null&&(L.type==="contextmenu"||Te===!0)){if(M.isThreadAllowed===!1)return;je(),L.preventDefault(),L.stopPropagation();const fe=t.toCollaborationEntityType({tab:"healthMonitor",key:M.key}),se=[...t.getFilteredThreads(Y,{entityType:fe,companyId:T},"both")],te=se.length>0&&se[0].length>0?se[0][0]:Le("healthMonitor",M.key,T);Y.has(te)?D(te):a===te?d(void 0):(d(te),F(null))}},[Y,T,a,D,d,F,ue,je]),le=p.useCallback((L,ge)=>{L.stopPropagation();const Te=Le("healthMonitor",ge,T);d(void 0),D(Te)},[T,d,D]),xe=L=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:L.isElementThreadOpen??!1,isElementThreadPresent:L.isElementThreadPresent??!1,itemKey:L.itemKey,elementThreadId:L.elementThreadId??"",roomId:B,addThreadRequestThreadId:a,openThreadId:ee,threadStyle:L.threadStyle,openThreadMetadata:G?.metadata??null,onElementClick:de,onAddThreadClick:le});return o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{ue(null),a!=null&&(d(void 0),a.includes(t.NEW_THREAD_SUFFIX)&&Q(a))},children:o.jsxRuntimeExports.jsx(z1,{windowSize:m,isThreadOpen:ie||me,totalHeight:i,isCreationInProgress:ae,"data-testid":t.generateDataTestId("health-monitor-row",T),onClick:()=>u(V.companyId),children:no.map((L,ge)=>{const Te=t.toCollaborationEntityType({tab:"healthMonitor",key:L.key}),M=no.length-2<=ge,fe=[...t.getFilteredThreads(Y,{entityType:Te,companyId:T},"both")],se=fe.length>0&&fe[0].length>0?fe[0][0]:Le("healthMonitor",L.key,T),te=Y.get(se),we=te!=null&&te.resolved===!1,Se=se===ee,He=a===se,Ie=W.lastEngagements;switch(L.key){case"companyName":return o.jsxRuntimeExports.jsxs(W1,{companyNameSticky:r,columnWidth:L.width,windowSize:m,isThreadOpen:Se||He,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-company-name",T),onContextMenu:X=>de(X,L.key),ref:X=>{l(T,L.key,X)},children:[o.jsxRuntimeExports.jsxs(H1,{ref:q,"data-testid":t.generateDataTestId("health-monitor-row-company-name-text",T),children:[V.name,o.jsxRuntimeExports.jsx(t.ThreadComponent,{anchorRef:q,isElementThreadOpen:Se,roomId:B,openThreadId:ee,openThreadMetadata:G?.metadata??null})]}),o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`2px ${t.Space.sp2}`},title:"Notes",children:o.jsxRuntimeExports.jsxs(G1,{className:"notesIcon","data-testid":t.generateDataTestId("health-monitor-row-notes-icon",T),onClick:X=>{X.preventDefault(),X.stopPropagation(),c({roomId:B,companyId:T,companyName:z,entityType:P})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:k.length,isLoading:N}),o.jsxRuntimeExports.jsx(Y1,{})]})}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:we,itemKey:L.key,style:{left:t.Space.sp4},onElementClick:de}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Le("healthMonitor",L.key,T),addThreadRequestThreadId:a,itemKey:L.key,onAddThreadClick:le})]},se);case"productVerticals":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-product-verticals",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(Qa,{productVerticals:_.verticalProductServices,testIdSuffix:T}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"runway":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-runway",T),onContextMenu:X=>de(X,L.key),children:[V.runway!=null?J.isCompanyRunwayInfinite(V.runway)===!0?o.jsxRuntimeExports.jsx(Z1,{"data-testid":t.generateDataTestId("health-monitor-row-runway-infinity",T)}):Ga(V.runway.runwayMonths):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:x}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"churnProbability":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-churn-probability",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(K1,{"data-testid":t.generateDataTestId("health-monitor-row-churn-meter",T),children:o.jsxRuntimeExports.jsx(Ka,{percentage:V.churnProbabilityPercentage,barHeight:12})}),W.churnProbabilityPercentage!=null?o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`,textAlign:"left"},title:o.jsxRuntimeExports.jsxs(q1,{children:[o.jsxRuntimeExports.jsx(J1,{children:`${O1} ${b} ${e.companyInfo.name} ${N1} ${Math.round(W.churnProbabilityPercentage??0)}${C}${j}`}),e.companyHealthMetric.churnProbabilityReason.length!==0||e.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(_r,{children:[o.jsxRuntimeExports.jsxs(Br,{children:[I,S]}),o.jsxRuntimeExports.jsxs(Wr,{children:[e.companyHealthMetric.churnProbabilityReason.map((X,ke)=>o.jsxRuntimeExports.jsx(qn,{children:o.jsxRuntimeExports.jsx(Jn,{children:X.text})},`${o.nanoid()}_${ke}}`)),e.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((X,ke)=>o.jsxRuntimeExports.jsx(qn,{children:o.jsxRuntimeExports.jsx(Jn,{children:X.value})},`${o.nanoid()}_${ke}}`))]})]}):null,e.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(_r,{children:[o.jsxRuntimeExports.jsxs(Br,{children:[$,S]}),o.jsxRuntimeExports.jsx(Wr,{children:e.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((X,ke)=>o.jsxRuntimeExports.jsx(qn,{children:o.jsxRuntimeExports.jsx(Jn,{children:X.value})},`${o.nanoid()}_${ke}}`))})]}):null]}),children:o.jsxRuntimeExports.jsx(Q1,{"data-testid":t.generateDataTestId("health-monitor-row-churn-info-icon",T),style:{marginTop:t.Space.sp1,marginLeft:t.Space.sp1,marginRight:t.Space.sp0}})}):null,xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"customerSatisfactionScore":case"netPromoterScore":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId(`health-monitor-row-${L.key==="netPromoterScore"?"nps":"csat"}`,T),onContextMenu:X=>de(X,L.key),children:[V[L.key]!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(U1,{children:V[L.key]}),o.jsxRuntimeExports.jsx(V1,{children:f}),L.key==="netPromoterScore"?o.jsxRuntimeExports.jsxs(Fr,{children:[" ",hc," "]}):o.jsxRuntimeExports.jsxs(Fr,{children:[" ",gc," "]})]}):V.churnProbabilityPercentage!=null?y:x,xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"controller":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-controller",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(t.Tooltip,{enterDelay:600,style:{padding:`2px ${t.Space.sp2}`},title:V.controllers.join(", "),children:V.controllers[0]}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"customerSuccessManager":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-csm",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(t.Tooltip,{enterDelay:600,style:{padding:`2px ${t.Space.sp2}`,textAlign:"left"},maxWidth:"300px",title:V.customerSuccessManagers.join(", "),children:V.customerSuccessManagers[0]}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"lastReportSent":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-last-report-sent",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(Qn,{children:V.lastReportSent!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:Ko(V.lastReportSent)}),o.jsxRuntimeExports.jsx(t.SmallRegular,{children:V.lastReportSent.format(w.visual.MMMDCommaYYYYformat)})]}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:x})}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"renewalDate":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-renewal-date",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(Qn,{children:V.renewalDate!=null?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:Ko(V.renewalDate)}),o.jsxRuntimeExports.jsx(t.SmallRegular,{children:V.renewalDate.format(w.visual.MMMDCommaYYYYformat)})]}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:x})}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"group":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-group",T),onContextMenu:X=>de(X,L.key),children:[V.companyGroup!=null?o.jsxRuntimeExports.jsx(X1,{"data-testid":t.generateDataTestId("health-monitor-row-group-badge",T),textColor:Oa[V.companyGroup.id],children:V.companyGroup.name.toUpperCase()}):x,xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-mrr",T),onContextMenu:X=>de(X,L.key),children:[t.amountToString("0,0",V.monthlyRecurringRevenue),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"externalProductServiceExposure":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-external-exposure",T),onContextMenu:X=>de(X,L.key),children:[V.externalProductServiceExposure!=null?V.externalProductServiceExposure.name:x,xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"lastEngagement":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-last-engagement",T),onContextMenu:X=>de(X,L.key),children:[Ie.length>0?o.jsxRuntimeExports.jsxs(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`},title:o.jsxRuntimeExports.jsxs(eS,{children:[o.jsxRuntimeExports.jsxs(tS,{children:[v,S]}),Ie.map((X,ke)=>o.jsxRuntimeExports.jsxs(oS,{children:[o.jsxRuntimeExports.jsxs(nS,{children:[X.type==="email"?o.jsxRuntimeExports.jsx(iS,{}):o.jsxRuntimeExports.jsx(aS,{}),o.jsxRuntimeExports.jsx(_1,{children:X.type==="email"?g:E.meeting})]}),o.jsxRuntimeExports.jsx(sS,{children:X.scheduledAt?.utc(!0).local().format(w.visual.MMMDCommaYYYYformat)??x})]},`${o.nanoid()}_${ke}}`))]}),children:[Ie[0].scheduledAt?.utc(!0).local().format(w.visual.MMMDCommaYYYYformat)??x,o.jsxRuntimeExports.jsxs(rS,{children:[Ie[0].type==="email"?o.jsxRuntimeExports.jsx(qa,{className:"engagement-email-icon"}):o.jsxRuntimeExports.jsx(Ja,{className:"engagement-meeting-icon"}),o.jsxRuntimeExports.jsxs(lS,{children:["Via",h,Ie[0].type==="email"?g:E.meeting]})]})]}):o.jsxRuntimeExports.jsx(t.StandardRegular,{children:x}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"dashboardLastSeen":case"subscriptionDate":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId(`health-monitor-row-${L.key==="dashboardLastSeen"?"dashboard-last-seen":"subscription-date"}`,T),onContextMenu:X=>de(X,L.key),children:[V.subscriptionStartDate??x,xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);case"companyEngagementMetricsUpdatedAt":return o.jsxRuntimeExports.jsxs(st,{ref:X=>{l(T,L.key,X)},columnWidth:L.width,windowSize:m,isThreadAllowed:L.isThreadAllowed,className:ne,"data-testid":t.generateDataTestId("health-monitor-row-engagement-updated",T),onContextMenu:X=>de(X,L.key),children:[o.jsxRuntimeExports.jsx(Qn,{children:V.companyEngagementMetricsUpdatedAt!=null?o.jsxRuntimeExports.jsx(t.LargeRegular,{children:Ko(V.companyEngagementMetricsUpdatedAt)}):o.jsxRuntimeExports.jsx(t.LargeRegular,{children:x})}),xe({isElementThreadOpen:Se,isElementThreadPresent:we,itemKey:L.key,elementThreadId:se,threadStyle:M?{right:t.Space.sp0}:void 0})]},se);default:return null}})})})}const Qa=({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(F1,{"data-testid":t.generateDataTestId("health-monitor-product-services",n),children:e.map((i,a)=>{const c=r(i.productServiceKey);if(c!=null){const l=n!=null&&n!==""?`${c.key}-${n}`:c.key;return o.jsxRuntimeExports.jsx(B1,{color:c.color,isEnabled:i.isEnabled,"data-testid":t.generateDataTestId("health-monitor-product-chip",l),children:c.key},`${o.nanoid()}_${a}`)}else return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{})})})},z1=s.div`
|
|
1566
1566
|
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
1567
1567
|
border-radius: ${t.Space.sp2};
|
|
1568
1568
|
display: flex;
|
|
@@ -1615,7 +1615,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1615
1615
|
display: flex;
|
|
1616
1616
|
justify-content: flex-start;
|
|
1617
1617
|
gap: ${t.Space.sp2};
|
|
1618
|
-
`,
|
|
1618
|
+
`,_1=s.div``,B1=s(t.SmallRegular)`
|
|
1619
1619
|
padding: 1px 6px;
|
|
1620
1620
|
border-radius: ${t.Space.sp1};
|
|
1621
1621
|
border: ${e=>`1px solid ${e.isEnabled?e.color:e.theme.colors.grey2}`};
|
|
@@ -1695,9 +1695,9 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1695
1695
|
&:hover {
|
|
1696
1696
|
color: ${e=>e.theme.colors.primary};
|
|
1697
1697
|
}
|
|
1698
|
-
`,q1=s.div``,J1=s(t.StandardRegular)``,
|
|
1698
|
+
`,q1=s.div``,J1=s(t.StandardRegular)``,_r=s.div`
|
|
1699
1699
|
margin-top: ${t.Space.sp2};
|
|
1700
|
-
`,
|
|
1700
|
+
`,Br=s(t.StandardRegular)``,Wr=s.ul`
|
|
1701
1701
|
padding-left: ${t.Space.sp4};
|
|
1702
1702
|
margin-top: ${t.Space.sp0};
|
|
1703
1703
|
`,eS=s.div``,tS=s(t.StandardRegular)`
|
|
@@ -1743,7 +1743,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1743
1743
|
color: ${t.Colors.heroDark};
|
|
1744
1744
|
`,aS=s(Ja)`
|
|
1745
1745
|
color: ${t.Colors.heroDark};
|
|
1746
|
-
`,lS=s(t.SmallRegular)``,{common:tt,cockpit:{health:{detailPage:ze,common:{engagementTypes:cS,labels:{lastEngagements:dS,factorsThatDecreaseChurnProbability:pS,factorsThatIncreaseChurnProbability:uS,contributingFactors:mS,increaseChurnProbability:xS,decreasingChurnProbability:hS}}}},dateFormat:gS}=t.appLocale.getLocalizedStrings(),{to:SS,from:yS,cc:fS,host:CS,attendees:jS,strings:{colon:et,hyphen:Vr,comma:bS,space:RS},texts:{subject:Ur,addMore:$S,select:ES}}=tt,{strings:{percentage:Hr}}=tt,cn=(e,n)=>`${e}.${n}`,Kr=e=>`${e}_form`,wt="healthMonitorDetails",Gr="healthMonitorPage",Yr="netPromoterScore",Zr="customerSatisfactionScore",Xr="externalProductServiceExposure",Qr="additionalChurnFactors",el=e=>[{label:uS,options:e.increasingChurnProbability.map(n=>({label:n.value,value:n.code}))},{label:pS,options:e.decreasingChurnProbability.map(n=>({label:n.value,value:n.code}))}],tl=e=>e==null?[]:e.increasingChurnProbability.map(n=>n.code).concat(e.decreasingChurnProbability.map(n=>n.code));function vS({localData:e,companyHealthMetricViewSelector:n,additionalChurnFactorsOptions:r,analytics:i,urlSource:a,onCloseDrawer:c,onSaveChangesToLocalStore:l,onSaveClick:d}){const{selectedCompanyDetail:u,localFormDataAndStatusByCompanyId:m}=n,[x,f]=p.useState(!1),h=Ya(u),[S,j]=p.useState(!1),[g,b]=p.useState(!1),C=o.useForm({mode:"all",defaultValues:wS(e,r),reValidateMode:"onBlur"}),y=p.useRef(null);function E(R){u!=null&&i.trackCockpitHealthMonitorChurnFormClicked(R,{companyId:u.companyInfo.companyId,companyName:u.companyInfo.name,zeniProductAndServicesCount:u.noOfProductVerticalsEnabled,daysToRenewal:Xn(u.companyHealthMetric.subscriptionRenewalDate)??null,netPromoterScore:m?.companyHealthMetricLocalData.netPromoterScore??null,customerSatisfactionScore:m?.companyHealthMetricLocalData.customerSatisfactionScore??null,externalServicesExposure:m?.companyHealthMetricLocalData.externalProductServiceExposure??null,runwayMonths:J.isCompanyRunwayInfinite(u.companyHealthMetric.runway)===!0?1e6:u.companyHealthMetric.runway===void 0?null:u.companyHealthMetric.runway.runwayMonths??null,dashBoardLastSeen:Xn(u.companyHealthMetric.customerLastDashboardVisit)??null,lastReportSent:Xn(u.managementInfo.lastReportSentDate)??null,churnProbability:u.companyHealthMetric.churnProbabilityPercentage??null})}const v=C.handleSubmit(()=>{E("Save"),y?.current&&y.current.scrollTo({top:0,behavior:"instant"}),j(!0),f(!0),d()}),$=async(R,A)=>{if(R!=null){const _={...A},P=_[wt][Qr].selectedOptions,k={netPromoterScore:_[wt][Yr]?.selectedOption,customerSatisfactionScore:_[wt][Zr]?.selectedOption,externalProductServiceExposure:_[wt][Xr]?.selectedOption,additionalChurnFactors:{increasingChurnProbability:r.increasingChurnProbability.filter(N=>P.indexOf(N.code)!=-1),decreasingChurnProbability:r.decreasingChurnProbability.filter(N=>P.indexOf(N.code)!=-1)}};l(k)}},I=p.useRef(null),w=p.useRef(null),[T,z]=p.useState(null),B=p.useRef(null),H=tl(e.additionalChurnFactors);p.useEffect(()=>(w.current=setTimeout(()=>{I.current&&(z(I.current),w.current&&clearTimeout(w.current))},10),()=>{w.current!=null&&clearTimeout(w.current)}),[H]),p.useEffect(()=>{const R=C.watch((A,{name:_})=>{_!=null&&A!=null&&o.defer(()=>$(_,A))});return()=>{R.unsubscribe()}}),p.useEffect(()=>{if(u!=null){const A=u.controllers.map(_=>`${_.firstName} ${_.lastName}`);a||i.trackCockpitHealthMonitorRowClicked(u.companyInfo.companyId,u.companyInfo.name,A,u.companyHealthMetric.netPromoterScore,u.companyHealthMetric.customerSatisfactionScore,u.companyHealthMetric.churnProbabilityPercentage)}},[]);function U(R){return R!=null?`${tt.texts.churnProbability} ${tt.texts.is} ${h.churnProbabilityPercentage}${Hr}`:`${tt.texts.churnProbability} ${Hr}`}function K(){E("Cancel"),c()}const W={valueContainer:R=>({...R,padding:`2px ${t.Space.sp3}`,overflow:"unset"}),multiValue:R=>({...R,margin:0})};return o.jsxRuntimeExports.jsxs(ty,{ref:y,"data-testid":t.generateDataTestId("health-monitor-drawer"),children:[o.jsxRuntimeExports.jsxs(XS,{"data-testid":t.generateDataTestId("health-monitor-drawer-header"),children:[o.jsxRuntimeExports.jsx(QS,{"data-testid":t.generateDataTestId("health-monitor-drawer-title"),children:`${u?.companyInfo.name}${ze.heading}`}),o.jsxRuntimeExports.jsx(NS,{"data-testid":t.generateDataTestId("health-monitor-drawer-close-button"),onClick:K,children:o.jsxRuntimeExports.jsx(MS,{})})]}),o.jsxRuntimeExports.jsxs(ey,{children:[n.localFormDataAndStatusByCompanyId?.saveStatus?.fetchState==="Error"?o.jsxRuntimeExports.jsx(py,{"data-testid":t.generateDataTestId("health-monitor-drawer-error"),children:o.jsxRuntimeExports.jsxs(uy,{children:[o.jsxRuntimeExports.jsx(xy,{}),n.localFormDataAndStatusByCompanyId.saveStatus.error?.message!=null?o.jsxRuntimeExports.jsx(my,{"data-testid":t.generateDataTestId("health-monitor-drawer-error-text"),children:n.localFormDataAndStatusByCompanyId.saveStatus.error?.message}):null]})}):null,o.jsxRuntimeExports.jsx(FS,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-section"),children:m?.saveStatus?.fetchState==="In-Progress"?o.jsxRuntimeExports.jsxs(zS,{"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:ze.calculatingProbability})]}):o.jsxRuntimeExports.jsxs(qS,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-box"),children:[o.jsxRuntimeExports.jsx(JS,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-heading"),children:U(h.churnProbabilityPercentage)}),o.jsxRuntimeExports.jsx(TS,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-meter"),children:o.jsxRuntimeExports.jsx(Ka,{barHeight:32,percentage:h.churnProbabilityPercentage})}),o.jsxRuntimeExports.jsx(BS,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-reasons"),children:u?.companyHealthMetric.churnProbabilityPercentage!=null&&u?.companyHealthMetric.churnProbabilityReason.length!==0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(_S,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-contributing-heading"),children:mS}),u.companyHealthMetric.churnProbabilityReason.length!==0||u.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(Jr,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-increasing-factors"),children:[o.jsxRuntimeExports.jsx(qr,{children:`${xS}${et}`}),o.jsxRuntimeExports.jsxs(ti,{children:[u.companyHealthMetric.churnProbabilityReason.map((R,A)=>o.jsxRuntimeExports.jsx(es,{children:o.jsxRuntimeExports.jsx(ts,{children:R.text})},`${o.nanoid()}_${A}}`)),u.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((R,A)=>o.jsxRuntimeExports.jsxs(es,{children:[o.jsxRuntimeExports.jsx(ts,{children:R.value}),o.jsxRuntimeExports.jsx(ei,{children:"Newly added"})]},`${o.nanoid()}_${A}}`))]})]}):null,u?.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(Jr,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-decreasing-factors"),children:[o.jsxRuntimeExports.jsx(qr,{children:`${hS}${et}`}),o.jsxRuntimeExports.jsx(ti,{children:u.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((R,A)=>o.jsxRuntimeExports.jsxs(es,{children:[o.jsxRuntimeExports.jsx(ts,{children:R.value}),o.jsxRuntimeExports.jsx(ei,{children:"Newly added"})]},`${o.nanoid()}_${A}}`))})]}):null,o.jsxRuntimeExports.jsxs(US,{"data-testid":t.generateDataTestId("health-monitor-drawer-add-more-button"),onClick:()=>{t.scrollContainerToTargetAdjusted(B?.current,y?.current),setTimeout(()=>{b(!0)},500)},ref:B,children:[o.jsxRuntimeExports.jsx(VS,{}),o.jsxRuntimeExports.jsx(WS,{children:$S})]})]}):null})]})}),o.jsxRuntimeExports.jsxs(ny,{"data-testid":t.generateDataTestId("health-monitor-drawer-form-container"),children:[o.jsxRuntimeExports.jsxs(HS,{children:[o.jsxRuntimeExports.jsxs(GS,{children:[o.jsxRuntimeExports.jsx(YS,{"data-testid":t.generateDataTestId("health-monitor-drawer-manual-input-heading"),children:ze.manualInput.header}),o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"250px",variant:"small-description",data:ze.tooltipTexts.manualInputText,placement:"top",children:o.jsxRuntimeExports.jsx(dn,{"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(KS,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-updated"),children:h.updatedByUserName!=null?o.jsxRuntimeExports.jsxs(oi,{children:[`${tt.texts.lastUpdatedBy}${et} ${h.updatedByUserName}`,o.jsxRuntimeExports.jsx(zs,{}),`${h.companyEngagementMetricsUpdatedAt.date}${bS}${RS}${h.companyEngagementMetricsUpdatedAt.time}`]}):o.jsxRuntimeExports.jsxs(oi,{children:[`${tt.texts.lastUpdated}${et} ${h.companyEngagementMetricsUpdatedAt.date}`,o.jsxRuntimeExports.jsx(zs,{}),`${h.companyEngagementMetricsUpdatedAt.time}`]})}):null]}),o.jsxRuntimeExports.jsx(o.FormProvider,{...C,children:o.jsxRuntimeExports.jsx("form",{id:Kr(Gr),onSubmit:v,children:o.jsxRuntimeExports.jsxs(sy,{"data-testid":t.generateDataTestId("health-monitor-drawer-form-fields"),children:[o.jsxRuntimeExports.jsx(IS,{"data-testid":t.generateDataTestId("health-monitor-drawer-nps-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectNumericField,{label:{label:`${tt.texts.nps}${et}`,width:0,style:{width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(R,A)=>({input:{textAlign:A.selectProps.menuIsOpen===!1&&e.netPromoterScore==null?"right":"left"}})},placeholder:tt.add,name:cn(wt,Yr),defaultValue:{allOptions:ya,selectedOption:e.netPromoterScore},registerOptions:{required:!0,validate:(R,A)=>A.healthMonitorDetails.customerSatisfactionScore.selectedOption?!0:R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(os,{}),o.jsxRuntimeExports.jsx(PS,{"data-testid":t.generateDataTestId("health-monitor-drawer-csat-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectNumericField,{label:{label:`${tt.texts.csat}${et}`,width:0,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"300px",variant:"small-description",data:ze.tooltipTexts.customerSatisfactionScoreText,placement:"top",children:o.jsxRuntimeExports.jsx(dn,{"data-testid":t.generateDataTestId("health-monitor-drawer-csat-info")})}),style:{marginRight:t.Space.sp2,width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(R,A)=>({input:{textAlign:A.selectProps.menuIsOpen===!1&&e.customerSatisfactionScore==null?"right":"left"}})},placeholder:tt.add,name:cn(wt,Zr),defaultValue:{allOptions:fa,selectedOption:e.customerSatisfactionScore},registerOptions:{required:!0,validate:(R,A)=>A.healthMonitorDetails.netPromoterScore.selectedOption?!0:R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(os,{}),o.jsxRuntimeExports.jsx(LS,{"data-testid":t.generateDataTestId("health-monitor-drawer-external-exposure-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectPickerField,{label:{label:ze.manualInput.labels.externalProductServices,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"265px",variant:"small-description",data:ze.tooltipTexts.externalProductServicesText,placement:"top",children:o.jsxRuntimeExports.jsx(dn,{"data-testid":t.generateDataTestId("health-monitor-drawer-external-exposure-info")})}),style:{marginRight:t.Space.sp2}},singleSelectPickerField:{placeholder:tt.add,name:cn(wt,Xr),defaultValue:{allOptions:J.companyHealthMetricDropDownOptions,selectedOption:e.externalProductServiceExposure},textAlignment:"right",registerOptions:{required:!0,validate:R=>R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(os,{}),o.jsxRuntimeExports.jsxs(ry,{"data-testid":t.generateDataTestId("health-monitor-drawer-additional-factors"),additionalNotesHidden:H.length===0,isFocused:g,children:[o.jsxRuntimeExports.jsx(t.LabeledGroupedMultiSelectField,{fullWidthSelect:!0,label:{label:`${ze.manualInput.labels.additionalContributingFactorsLabel}${et}`,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"280px",variant:"small-description",data:ze.tooltipTexts.additionalContributingFactorsText,placement:"top",children:o.jsxRuntimeExports.jsx(dn,{"data-testid":t.generateDataTestId("health-monitor-drawer-additional-factors-info")})})},groupedMultiSelectField:{name:cn(wt,Qr),treeViewStructure:!0,registerOptions:{required:!1},defaultValue:{allOptions:el(r),selectedOptions:H},placeholder:ES,customStyleConfig:W,showSelectedInNewLines:!0},isMenuOpen:g,setIsMenuOpen:b,menuPortalEnabled:!0}),H.length!==0&&o.jsxRuntimeExports.jsxs(ay,{"data-testid":t.generateDataTestId("health-monitor-drawer-notes-composer"),children:[o.jsxRuntimeExports.jsx(fy,{}),o.jsxRuntimeExports.jsx(iy,{ref:I,children:T&&Xo.createPortal(o.jsxRuntimeExports.jsx(n1,{roomId:`cockpit_${u?.companyInfo.companyId}`,threadMetadata:{application:"cockpit",companyId:u?.companyInfo.companyId!=null?u.companyInfo.companyId:"",entityId:u?.companyInfo.companyId!=null?u.companyInfo.companyId:"",companyName:u?.companyInfo.name!=null?u.companyInfo.name:"",tab:"healthMonitor",isGlobalComment:!1,entityType:"healthMonitor.notes",url:window.location.href},composerPlaceholder:ze.manualInput.placeholders.addANote,createThreadCallback:()=>{j(!1)},isSubmitComment:S}),T)})]})]})]})})})]}),o.jsxRuntimeExports.jsxs(oy,{"data-testid":t.generateDataTestId("health-monitor-drawer-prefilled-section"),children:[o.jsxRuntimeExports.jsx(ZS,{"data-testid":t.generateDataTestId("health-monitor-drawer-prefilled-heading"),children:ze.preFilledInput.header}),o.jsxRuntimeExports.jsxs(ly,{"data-testid":t.generateDataTestId("health-monitor-drawer-runway"),children:[o.jsxRuntimeExports.jsx(wo,{children:ze.preFilledInput.labels.runway}),h.runway!=null?J.isCompanyRunwayInfinite(h.runway)===!0?o.jsxRuntimeExports.jsx(dy,{}):o.jsxRuntimeExports.jsx(mo,{children:Ga(h.runway.runwayMonths)}):o.jsxRuntimeExports.jsx(mo,{children:ze.notApplicable})]}),o.jsxRuntimeExports.jsxs(pn,{"data-testid":t.generateDataTestId("health-monitor-drawer-dashboard-last-seen"),children:[o.jsxRuntimeExports.jsx(wo,{children:ze.preFilledInput.labels.dashboardLastSeen}),o.jsxRuntimeExports.jsx(mo,{children:h.dashboardLastVisit??ze.notApplicable})]}),o.jsxRuntimeExports.jsxs(pn,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-report-sent"),children:[o.jsxRuntimeExports.jsx(wo,{children:ze.preFilledInput.labels.lastReportSent}),o.jsxRuntimeExports.jsx(mo,{children:h.lastReportSent??ze.notApplicable})]}),o.jsxRuntimeExports.jsxs(pn,{"data-testid":t.generateDataTestId("health-monitor-drawer-product-services"),children:[o.jsxRuntimeExports.jsx(wo,{children:ze.preFilledInput.labels.zeniProductServices}),o.jsxRuntimeExports.jsx(mo,{children:o.jsxRuntimeExports.jsx(Qa,{productVerticals:u?.companyHealthMetric.verticalProductServices??[],testIdSuffix:u?.companyInfo.companyId})})]}),o.jsxRuntimeExports.jsxs(pn,{"data-testid":t.generateDataTestId("health-monitor-drawer-days-to-renewal"),children:[o.jsxRuntimeExports.jsx(wo,{children:ze.preFilledInput.labels.daysToRenewal}),o.jsxRuntimeExports.jsx(mo,{children:h.renewalDate??ze.notApplicable})]}),o.jsxRuntimeExports.jsx(cy,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-engagements"),children:o.jsxRuntimeExports.jsx(t.LabeledReadOnlyTextField,{label:{label:`${dS}${et}`},text:o.jsxRuntimeExports.jsx(hy,{children:h.lastEngagements.length>0?h.lastEngagements.map((R,A)=>o.jsxRuntimeExports.jsx(gy,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement",String(A)),children:o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`,color:t.Colors.heroDark},title:o.jsxRuntimeExports.jsx(yy,{children:R.type==="email"?o.jsxRuntimeExports.jsxs(ni,{children:[o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[Ur,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.subject})]}),o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[yS,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.from})]}),o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[SS,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.to})]}),R.cc!=""?o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[fS,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.cc})]}):null]}):o.jsxRuntimeExports.jsxs(ni,{children:[o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[Ur,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.subject})]}),o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[CS,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.hostName})]}),o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[jS,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.attendees})]})]})}),placement:"left",children:o.jsxRuntimeExports.jsxs(Sy,{children:[o.jsxRuntimeExports.jsxs(OS,{children:[R.type==="email"?o.jsxRuntimeExports.jsx(jy,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement-email-icon",String(A))}):o.jsxRuntimeExports.jsx(Cy,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement-meeting-icon",String(A))}),o.jsxRuntimeExports.jsx(kS,{children:R.type==="email"?tt.settings.notifications.mode.email:cS.meeting})]}),o.jsxRuntimeExports.jsx(by,{className:"engagementDot"}),o.jsxRuntimeExports.jsx(DS,{children:R.scheduledAt?.utc(!0).local().format(gS.visual.MMMDCommaYYYYformat)??Vr})]},`${o.nanoid()}_${A}}`)})},A)):Vr}),style:{width:"100%"}})})]})]}),J.hasCompanyHealthMetricFormFieldChanged(u?.companyHealthMetric,m?.companyHealthMetricLocalData)===!0||x===!1?o.jsxRuntimeExports.jsx(AS,{"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:Kr(Gr),primaryBtn:{label:tt.save,style:{minWidth:112},isLoading:m?.saveStatus?.fetchState==="In-Progress"},cancelBtn:{label:tt.cancel,style:{minWidth:112},onClick:K}})}):null]})}const wS=(e,n)=>({[wt]:{netPromoterScore:{selectedOption:e.netPromoterScore,allOptions:ya},customerSatisfactionScore:{selectedOption:e.customerSatisfactionScore,allOptions:fa},externalProductServiceExposure:{selectedOption:e.externalProductServiceExposure,allOptions:J.companyHealthMetricDropDownOptions},additionalChurnFactors:{selectedOptions:tl(e.additionalChurnFactors),allOptions:el(n)}}}),kS=s.div``,TS=s.div``,IS=s.div``,PS=s.div``,LS=s.div``,AS=s.div``,DS=s.div`
|
|
1746
|
+
`,lS=s(t.SmallRegular)``,{common:tt,cockpit:{health:{detailPage:ze,common:{engagementTypes:cS,labels:{lastEngagements:dS,factorsThatDecreaseChurnProbability:pS,factorsThatIncreaseChurnProbability:uS,contributingFactors:mS,increaseChurnProbability:xS,decreasingChurnProbability:hS}}}},dateFormat:gS}=t.appLocale.getLocalizedStrings(),{to:SS,from:yS,cc:fS,host:CS,attendees:jS,strings:{colon:et,hyphen:Vr,comma:bS,space:RS},texts:{subject:Ur,addMore:$S,select:ES}}=tt,{strings:{percentage:Hr}}=tt,cn=(e,n)=>`${e}.${n}`,Kr=e=>`${e}_form`,wt="healthMonitorDetails",Gr="healthMonitorPage",Yr="netPromoterScore",Zr="customerSatisfactionScore",Xr="externalProductServiceExposure",Qr="additionalChurnFactors",el=e=>[{label:uS,options:e.increasingChurnProbability.map(n=>({label:n.value,value:n.code}))},{label:pS,options:e.decreasingChurnProbability.map(n=>({label:n.value,value:n.code}))}],tl=e=>e==null?[]:e.increasingChurnProbability.map(n=>n.code).concat(e.decreasingChurnProbability.map(n=>n.code));function vS({localData:e,companyHealthMetricViewSelector:n,additionalChurnFactorsOptions:r,analytics:i,urlSource:a,onCloseDrawer:c,onSaveChangesToLocalStore:l,onSaveClick:d}){const{selectedCompanyDetail:u,localFormDataAndStatusByCompanyId:m}=n,[x,f]=p.useState(!1),h=Ya(u),[S,j]=p.useState(!1),[g,b]=p.useState(!1),C=o.useForm({mode:"all",defaultValues:wS(e,r),reValidateMode:"onBlur"}),y=p.useRef(null);function E(R){u!=null&&i.trackCockpitHealthMonitorChurnFormClicked(R,{companyId:u.companyInfo.companyId,companyName:u.companyInfo.name,zeniProductAndServicesCount:u.noOfProductVerticalsEnabled,daysToRenewal:Xn(u.companyHealthMetric.subscriptionRenewalDate)??null,netPromoterScore:m?.companyHealthMetricLocalData.netPromoterScore??null,customerSatisfactionScore:m?.companyHealthMetricLocalData.customerSatisfactionScore??null,externalServicesExposure:m?.companyHealthMetricLocalData.externalProductServiceExposure??null,runwayMonths:J.isCompanyRunwayInfinite(u.companyHealthMetric.runway)===!0?1e6:u.companyHealthMetric.runway===void 0?null:u.companyHealthMetric.runway.runwayMonths??null,dashBoardLastSeen:Xn(u.companyHealthMetric.customerLastDashboardVisit)??null,lastReportSent:Xn(u.managementInfo.lastReportSentDate)??null,churnProbability:u.companyHealthMetric.churnProbabilityPercentage??null})}const v=C.handleSubmit(()=>{E("Save"),y?.current&&y.current.scrollTo({top:0,behavior:"instant"}),j(!0),f(!0),d()}),$=async(R,A)=>{if(R!=null){const B={...A},P=B[wt][Qr].selectedOptions,k={netPromoterScore:B[wt][Yr]?.selectedOption,customerSatisfactionScore:B[wt][Zr]?.selectedOption,externalProductServiceExposure:B[wt][Xr]?.selectedOption,additionalChurnFactors:{increasingChurnProbability:r.increasingChurnProbability.filter(N=>P.indexOf(N.code)!=-1),decreasingChurnProbability:r.decreasingChurnProbability.filter(N=>P.indexOf(N.code)!=-1)}};l(k)}},I=p.useRef(null),w=p.useRef(null),[T,z]=p.useState(null),_=p.useRef(null),H=tl(e.additionalChurnFactors);p.useEffect(()=>(w.current=setTimeout(()=>{I.current&&(z(I.current),w.current&&clearTimeout(w.current))},10),()=>{w.current!=null&&clearTimeout(w.current)}),[H]),p.useEffect(()=>{const R=C.watch((A,{name:B})=>{B!=null&&A!=null&&o.defer(()=>$(B,A))});return()=>{R.unsubscribe()}}),p.useEffect(()=>{if(u!=null){const A=u.controllers.map(B=>`${B.firstName} ${B.lastName}`);a||i.trackCockpitHealthMonitorRowClicked(u.companyInfo.companyId,u.companyInfo.name,A,u.companyHealthMetric.netPromoterScore,u.companyHealthMetric.customerSatisfactionScore,u.companyHealthMetric.churnProbabilityPercentage)}},[]);function U(R){return R!=null?`${tt.texts.churnProbability} ${tt.texts.is} ${h.churnProbabilityPercentage}${Hr}`:`${tt.texts.churnProbability} ${Hr}`}function K(){E("Cancel"),c()}const W={valueContainer:R=>({...R,padding:`2px ${t.Space.sp3}`,overflow:"unset"}),multiValue:R=>({...R,margin:0})};return o.jsxRuntimeExports.jsxs(ty,{ref:y,"data-testid":t.generateDataTestId("health-monitor-drawer"),children:[o.jsxRuntimeExports.jsxs(XS,{"data-testid":t.generateDataTestId("health-monitor-drawer-header"),children:[o.jsxRuntimeExports.jsx(QS,{"data-testid":t.generateDataTestId("health-monitor-drawer-title"),children:`${u?.companyInfo.name}${ze.heading}`}),o.jsxRuntimeExports.jsx(NS,{"data-testid":t.generateDataTestId("health-monitor-drawer-close-button"),onClick:K,children:o.jsxRuntimeExports.jsx(MS,{})})]}),o.jsxRuntimeExports.jsxs(ey,{children:[n.localFormDataAndStatusByCompanyId?.saveStatus?.fetchState==="Error"?o.jsxRuntimeExports.jsx(py,{"data-testid":t.generateDataTestId("health-monitor-drawer-error"),children:o.jsxRuntimeExports.jsxs(uy,{children:[o.jsxRuntimeExports.jsx(xy,{}),n.localFormDataAndStatusByCompanyId.saveStatus.error?.message!=null?o.jsxRuntimeExports.jsx(my,{"data-testid":t.generateDataTestId("health-monitor-drawer-error-text"),children:n.localFormDataAndStatusByCompanyId.saveStatus.error?.message}):null]})}):null,o.jsxRuntimeExports.jsx(FS,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-section"),children:m?.saveStatus?.fetchState==="In-Progress"?o.jsxRuntimeExports.jsxs(zS,{"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:ze.calculatingProbability})]}):o.jsxRuntimeExports.jsxs(qS,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-box"),children:[o.jsxRuntimeExports.jsx(JS,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-heading"),children:U(h.churnProbabilityPercentage)}),o.jsxRuntimeExports.jsx(TS,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-meter"),children:o.jsxRuntimeExports.jsx(Ka,{barHeight:32,percentage:h.churnProbabilityPercentage})}),o.jsxRuntimeExports.jsx(_S,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-reasons"),children:u?.companyHealthMetric.churnProbabilityPercentage!=null&&u?.companyHealthMetric.churnProbabilityReason.length!==0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(BS,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-contributing-heading"),children:mS}),u.companyHealthMetric.churnProbabilityReason.length!==0||u.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(Jr,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-increasing-factors"),children:[o.jsxRuntimeExports.jsx(qr,{children:`${xS}${et}`}),o.jsxRuntimeExports.jsxs(ti,{children:[u.companyHealthMetric.churnProbabilityReason.map((R,A)=>o.jsxRuntimeExports.jsx(es,{children:o.jsxRuntimeExports.jsx(ts,{children:R.text})},`${o.nanoid()}_${A}}`)),u.companyHealthMetric.additionalChurnFactors.increasingChurnProbability.map((R,A)=>o.jsxRuntimeExports.jsxs(es,{children:[o.jsxRuntimeExports.jsx(ts,{children:R.value}),o.jsxRuntimeExports.jsx(ei,{children:"Newly added"})]},`${o.nanoid()}_${A}}`))]})]}):null,u?.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.length!==0?o.jsxRuntimeExports.jsxs(Jr,{"data-testid":t.generateDataTestId("health-monitor-drawer-churn-decreasing-factors"),children:[o.jsxRuntimeExports.jsx(qr,{children:`${hS}${et}`}),o.jsxRuntimeExports.jsx(ti,{children:u.companyHealthMetric.additionalChurnFactors.decreasingChurnProbability.map((R,A)=>o.jsxRuntimeExports.jsxs(es,{children:[o.jsxRuntimeExports.jsx(ts,{children:R.value}),o.jsxRuntimeExports.jsx(ei,{children:"Newly added"})]},`${o.nanoid()}_${A}}`))})]}):null,o.jsxRuntimeExports.jsxs(US,{"data-testid":t.generateDataTestId("health-monitor-drawer-add-more-button"),onClick:()=>{t.scrollContainerToTargetAdjusted(_?.current,y?.current),setTimeout(()=>{b(!0)},500)},ref:_,children:[o.jsxRuntimeExports.jsx(VS,{}),o.jsxRuntimeExports.jsx(WS,{children:$S})]})]}):null})]})}),o.jsxRuntimeExports.jsxs(ny,{"data-testid":t.generateDataTestId("health-monitor-drawer-form-container"),children:[o.jsxRuntimeExports.jsxs(HS,{children:[o.jsxRuntimeExports.jsxs(GS,{children:[o.jsxRuntimeExports.jsx(YS,{"data-testid":t.generateDataTestId("health-monitor-drawer-manual-input-heading"),children:ze.manualInput.header}),o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"250px",variant:"small-description",data:ze.tooltipTexts.manualInputText,placement:"top",children:o.jsxRuntimeExports.jsx(dn,{"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(KS,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-updated"),children:h.updatedByUserName!=null?o.jsxRuntimeExports.jsxs(oi,{children:[`${tt.texts.lastUpdatedBy}${et} ${h.updatedByUserName}`,o.jsxRuntimeExports.jsx(zs,{}),`${h.companyEngagementMetricsUpdatedAt.date}${bS}${RS}${h.companyEngagementMetricsUpdatedAt.time}`]}):o.jsxRuntimeExports.jsxs(oi,{children:[`${tt.texts.lastUpdated}${et} ${h.companyEngagementMetricsUpdatedAt.date}`,o.jsxRuntimeExports.jsx(zs,{}),`${h.companyEngagementMetricsUpdatedAt.time}`]})}):null]}),o.jsxRuntimeExports.jsx(o.FormProvider,{...C,children:o.jsxRuntimeExports.jsx("form",{id:Kr(Gr),onSubmit:v,children:o.jsxRuntimeExports.jsxs(sy,{"data-testid":t.generateDataTestId("health-monitor-drawer-form-fields"),children:[o.jsxRuntimeExports.jsx(IS,{"data-testid":t.generateDataTestId("health-monitor-drawer-nps-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectNumericField,{label:{label:`${tt.texts.nps}${et}`,width:0,style:{width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(R,A)=>({input:{textAlign:A.selectProps.menuIsOpen===!1&&e.netPromoterScore==null?"right":"left"}})},placeholder:tt.add,name:cn(wt,Yr),defaultValue:{allOptions:ya,selectedOption:e.netPromoterScore},registerOptions:{required:!0,validate:(R,A)=>A.healthMonitorDetails.customerSatisfactionScore.selectedOption?!0:R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(os,{}),o.jsxRuntimeExports.jsx(PS,{"data-testid":t.generateDataTestId("health-monitor-drawer-csat-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectNumericField,{label:{label:`${tt.texts.csat}${et}`,width:0,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"300px",variant:"small-description",data:ze.tooltipTexts.customerSatisfactionScoreText,placement:"top",children:o.jsxRuntimeExports.jsx(dn,{"data-testid":t.generateDataTestId("health-monitor-drawer-csat-info")})}),style:{marginRight:t.Space.sp2,width:"auto"}},singleSelectNumericField:{customStyleConfig:{input:(R,A)=>({input:{textAlign:A.selectProps.menuIsOpen===!1&&e.customerSatisfactionScore==null?"right":"left"}})},placeholder:tt.add,name:cn(wt,Zr),defaultValue:{allOptions:fa,selectedOption:e.customerSatisfactionScore},registerOptions:{required:!0,validate:(R,A)=>A.healthMonitorDetails.netPromoterScore.selectedOption?!0:R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(os,{}),o.jsxRuntimeExports.jsx(LS,{"data-testid":t.generateDataTestId("health-monitor-drawer-external-exposure-field"),children:o.jsxRuntimeExports.jsx(t.LabeledSingleSelectPickerField,{label:{label:ze.manualInput.labels.externalProductServices,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"265px",variant:"small-description",data:ze.tooltipTexts.externalProductServicesText,placement:"top",children:o.jsxRuntimeExports.jsx(dn,{"data-testid":t.generateDataTestId("health-monitor-drawer-external-exposure-info")})}),style:{marginRight:t.Space.sp2}},singleSelectPickerField:{placeholder:tt.add,name:cn(wt,Xr),defaultValue:{allOptions:J.companyHealthMetricDropDownOptions,selectedOption:e.externalProductServiceExposure},textAlignment:"right",registerOptions:{required:!0,validate:R=>R!=null&&!!R.selectedOption}},style:{width:"auto"}})}),o.jsxRuntimeExports.jsx(os,{}),o.jsxRuntimeExports.jsxs(ry,{"data-testid":t.generateDataTestId("health-monitor-drawer-additional-factors"),additionalNotesHidden:H.length===0,isFocused:g,children:[o.jsxRuntimeExports.jsx(t.LabeledGroupedMultiSelectField,{fullWidthSelect:!0,label:{label:`${ze.manualInput.labels.additionalContributingFactorsLabel}${et}`,labelIcon:o.jsxRuntimeExports.jsx(t.Tooltip,{maxWidth:"280px",variant:"small-description",data:ze.tooltipTexts.additionalContributingFactorsText,placement:"top",children:o.jsxRuntimeExports.jsx(dn,{"data-testid":t.generateDataTestId("health-monitor-drawer-additional-factors-info")})})},groupedMultiSelectField:{name:cn(wt,Qr),treeViewStructure:!0,registerOptions:{required:!1},defaultValue:{allOptions:el(r),selectedOptions:H},placeholder:ES,customStyleConfig:W,showSelectedInNewLines:!0},isMenuOpen:g,setIsMenuOpen:b,menuPortalEnabled:!0}),H.length!==0&&o.jsxRuntimeExports.jsxs(ay,{"data-testid":t.generateDataTestId("health-monitor-drawer-notes-composer"),children:[o.jsxRuntimeExports.jsx(fy,{}),o.jsxRuntimeExports.jsx(iy,{ref:I,children:T&&Xo.createPortal(o.jsxRuntimeExports.jsx(n1,{roomId:`cockpit_${u?.companyInfo.companyId}`,threadMetadata:{application:"cockpit",companyId:u?.companyInfo.companyId!=null?u.companyInfo.companyId:"",entityId:u?.companyInfo.companyId!=null?u.companyInfo.companyId:"",companyName:u?.companyInfo.name!=null?u.companyInfo.name:"",tab:"healthMonitor",isGlobalComment:!1,entityType:"healthMonitor.notes",url:window.location.href},composerPlaceholder:ze.manualInput.placeholders.addANote,createThreadCallback:()=>{j(!1)},isSubmitComment:S}),T)})]})]})]})})})]}),o.jsxRuntimeExports.jsxs(oy,{"data-testid":t.generateDataTestId("health-monitor-drawer-prefilled-section"),children:[o.jsxRuntimeExports.jsx(ZS,{"data-testid":t.generateDataTestId("health-monitor-drawer-prefilled-heading"),children:ze.preFilledInput.header}),o.jsxRuntimeExports.jsxs(ly,{"data-testid":t.generateDataTestId("health-monitor-drawer-runway"),children:[o.jsxRuntimeExports.jsx(wo,{children:ze.preFilledInput.labels.runway}),h.runway!=null?J.isCompanyRunwayInfinite(h.runway)===!0?o.jsxRuntimeExports.jsx(dy,{}):o.jsxRuntimeExports.jsx(mo,{children:Ga(h.runway.runwayMonths)}):o.jsxRuntimeExports.jsx(mo,{children:ze.notApplicable})]}),o.jsxRuntimeExports.jsxs(pn,{"data-testid":t.generateDataTestId("health-monitor-drawer-dashboard-last-seen"),children:[o.jsxRuntimeExports.jsx(wo,{children:ze.preFilledInput.labels.dashboardLastSeen}),o.jsxRuntimeExports.jsx(mo,{children:h.dashboardLastVisit??ze.notApplicable})]}),o.jsxRuntimeExports.jsxs(pn,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-report-sent"),children:[o.jsxRuntimeExports.jsx(wo,{children:ze.preFilledInput.labels.lastReportSent}),o.jsxRuntimeExports.jsx(mo,{children:h.lastReportSent??ze.notApplicable})]}),o.jsxRuntimeExports.jsxs(pn,{"data-testid":t.generateDataTestId("health-monitor-drawer-product-services"),children:[o.jsxRuntimeExports.jsx(wo,{children:ze.preFilledInput.labels.zeniProductServices}),o.jsxRuntimeExports.jsx(mo,{children:o.jsxRuntimeExports.jsx(Qa,{productVerticals:u?.companyHealthMetric.verticalProductServices??[],testIdSuffix:u?.companyInfo.companyId})})]}),o.jsxRuntimeExports.jsxs(pn,{"data-testid":t.generateDataTestId("health-monitor-drawer-days-to-renewal"),children:[o.jsxRuntimeExports.jsx(wo,{children:ze.preFilledInput.labels.daysToRenewal}),o.jsxRuntimeExports.jsx(mo,{children:h.renewalDate??ze.notApplicable})]}),o.jsxRuntimeExports.jsx(cy,{"data-testid":t.generateDataTestId("health-monitor-drawer-last-engagements"),children:o.jsxRuntimeExports.jsx(t.LabeledReadOnlyTextField,{label:{label:`${dS}${et}`},text:o.jsxRuntimeExports.jsx(hy,{children:h.lastEngagements.length>0?h.lastEngagements.map((R,A)=>o.jsxRuntimeExports.jsx(gy,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement",String(A)),children:o.jsxRuntimeExports.jsx(t.Tooltip,{style:{padding:`12px ${t.Space.sp3}`,color:t.Colors.heroDark},title:o.jsxRuntimeExports.jsx(yy,{children:R.type==="email"?o.jsxRuntimeExports.jsxs(ni,{children:[o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[Ur,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.subject})]}),o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[yS,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.from})]}),o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[SS,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.to})]}),R.cc!=""?o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[fS,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.cc})]}):null]}):o.jsxRuntimeExports.jsxs(ni,{children:[o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[Ur,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.subject})]}),o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[CS,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.hostName})]}),o.jsxRuntimeExports.jsxs(Ht,{children:[o.jsxRuntimeExports.jsxs(Kt,{children:[jS,et]}),o.jsxRuntimeExports.jsx(Gt,{children:R.attendees})]})]})}),placement:"left",children:o.jsxRuntimeExports.jsxs(Sy,{children:[o.jsxRuntimeExports.jsxs(OS,{children:[R.type==="email"?o.jsxRuntimeExports.jsx(jy,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement-email-icon",String(A))}):o.jsxRuntimeExports.jsx(Cy,{"data-testid":t.generateDataTestId("health-monitor-drawer-engagement-meeting-icon",String(A))}),o.jsxRuntimeExports.jsx(kS,{children:R.type==="email"?tt.settings.notifications.mode.email:cS.meeting})]}),o.jsxRuntimeExports.jsx(by,{className:"engagementDot"}),o.jsxRuntimeExports.jsx(DS,{children:R.scheduledAt?.utc(!0).local().format(gS.visual.MMMDCommaYYYYformat)??Vr})]},`${o.nanoid()}_${A}}`)})},A)):Vr}),style:{width:"100%"}})})]})]}),J.hasCompanyHealthMetricFormFieldChanged(u?.companyHealthMetric,m?.companyHealthMetricLocalData)===!0||x===!1?o.jsxRuntimeExports.jsx(AS,{"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:Kr(Gr),primaryBtn:{label:tt.save,style:{minWidth:112},isLoading:m?.saveStatus?.fetchState==="In-Progress"},cancelBtn:{label:tt.cancel,style:{minWidth:112},onClick:K}})}):null]})}const wS=(e,n)=>({[wt]:{netPromoterScore:{selectedOption:e.netPromoterScore,allOptions:ya},customerSatisfactionScore:{selectedOption:e.customerSatisfactionScore,allOptions:fa},externalProductServiceExposure:{selectedOption:e.externalProductServiceExposure,allOptions:J.companyHealthMetricDropDownOptions},additionalChurnFactors:{selectedOptions:tl(e.additionalChurnFactors),allOptions:el(n)}}}),kS=s.div``,TS=s.div``,IS=s.div``,PS=s.div``,LS=s.div``,AS=s.div``,DS=s.div`
|
|
1747
1747
|
min-width: 100px;
|
|
1748
1748
|
`,OS=s.div`
|
|
1749
1749
|
min-width: 80px;
|
|
@@ -1795,9 +1795,9 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1795
1795
|
border-radius: ${t.Space.sp2};
|
|
1796
1796
|
margin-bottom: ${t.Space.sp6};
|
|
1797
1797
|
box-shadow: ${e=>`${t.Space.sp0} 2px ${t.Space.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
1798
|
-
`,
|
|
1798
|
+
`,_S=s.div`
|
|
1799
1799
|
margin-top: ${t.Space.sp5};
|
|
1800
|
-
`,
|
|
1800
|
+
`,BS=s(t.ExtraLargeSemiBold)`
|
|
1801
1801
|
color: ${e=>e.theme.colors.primary};
|
|
1802
1802
|
`,qr=s(t.LargeMedium)`
|
|
1803
1803
|
margin-left: ${t.Space.sp2};
|
|
@@ -2149,7 +2149,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2149
2149
|
&:hover {
|
|
2150
2150
|
color: ${e=>e.theme.colors.primary};
|
|
2151
2151
|
}
|
|
2152
|
-
`,Py=e=>ce.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.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"}),ce.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"}),ce.createElement("path",{d:"M3.32568 4.56938V10.8194H5.82568",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),ce.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:{outOf:Ly,customers:Ay}}},common:{analytics:Dy,strings:{space:Oy},texts:{showing:Ny,comments:My}},collaboration:{threads:{placeholder:{addANewComment:zy,replyAComment:Fy},tooltip:{resolveComment:
|
|
2152
|
+
`,Py=e=>ce.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.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"}),ce.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"}),ce.createElement("path",{d:"M3.32568 4.56938V10.8194H5.82568",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),ce.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:{outOf:Ly,customers:Ay}}},common:{analytics:Dy,strings:{space:Oy},texts:{showing:Ny,comments:My}},collaboration:{threads:{placeholder:{addANewComment:zy,replyAComment:Fy},tooltip:{resolveComment:_y,unResolveComment:By}}}}=t.appLocale.getLocalizedStrings();function Wy({healthView:e,mixpanelUrl:n,onRowClick:r,onColumnSortConfigChanged:i,initialOpenThreadRequest:a}){const c=t.useWindowSizeContext(),l=p.useRef(null),[d,u]=p.useState(null),{uiState:m}=e,[x,f]=p.useState(null),{unfilteredCompanyCount:h}=e,{companies:S}=e,{setOpenThread:j,setRequestToOpenThread:g,requestToOpenThread:b,isLoading:C}=p.useContext(t.ThreadsContext),[y,E]=p.useState(void 0),v=p.useRef([]),$=!(c==="small"||c==="medium-compact"),I=_=>e.companies[_].companyInfo.name.length>lo?De+32:De,w=p.useMemo(()=>({makeCompanyNameSticky:$,uiState:m,onColumnSortConfigChanged:i}),[$,m,i]),T=p.useCallback((_,H,U)=>{const K=e.companies.findIndex(R=>R.companyInfo.companyId===_),W=no.findIndex(R=>R.key===H);K!==-1&&W!==-1&&(v.current[K]==null?v.current[K]=[U]:v.current[K][W]=U)},[e.companies]);p.useEffect(()=>{l.current&&l.current.resetAfterIndex(0)},[e]),p.useEffect(()=>{a!=null&&e.fetchState==="Completed"&&C===!1&&g(a)},[a,e.fetchState,C,g]),p.useEffect(()=>{if(b!=null&&d!=null){const{companyId:_,entityType:H}=b,[U,K]=H.split("."),W=e.companies.findIndex(P=>P.companyInfo.companyId===_),R=no.findIndex(P=>P.key===K);W!==-1&&!(d.visibleStartIndex<=W&&d.visibleStopIndex>=W)&&l.current?.scrollToItem(W,"center"),setTimeout(()=>{const P=v.current[W]?.[0]?.getBoundingClientRect().bottom,k=v.current[W]?.[0]?.getBoundingClientRect().top;P!=null&&k!=null&&(window.innerHeight>=P&&window.innerHeight>=k||k<0)&&v.current[W][R]?.scrollIntoView({block:"center",behavior:"auto"})},0);const B=setInterval(()=>{const P=v.current[W]?.[R]?.getBoundingClientRect().left,k=v.current[W]?.[R]?.getBoundingClientRect().right,N=v.current[W]?.[R]?.offsetWidth;if(P!=null&&N!=null&&k!=null&&(P<window.innerWidth-N||k<window.innerWidth)){clearInterval(B);const V=b.threadId,ee=b.onThreadShownCallback;V&&(g(null),j(b.threadId),ee?.())}},500);setTimeout(()=>{clearInterval(B),g(null)},2e3)}},[b,d,j,g]);const z=()=>{window.open(n,"_blank")};return o.jsxRuntimeExports.jsxs(Uy,{companyNameSticky:$,"data-testid":t.generateDataTestId("health-monitor-list-view"),children:[$&&o.jsxRuntimeExports.jsxs(Xy,{"data-testid":t.generateDataTestId("health-monitor-list-summary-bar"),children:[o.jsxRuntimeExports.jsxs(Qy,{"data-testid":t.generateDataTestId("health-monitor-list-summary-text"),children:[Ny," ",o.jsxRuntimeExports.jsx(Zy,{children:S.length})," ",Ly,Oy,h," ",Ay]}),o.jsxRuntimeExports.jsx(qy,{"data-testid":t.generateDataTestId("health-monitor-list-analytics-button"),children:o.jsxRuntimeExports.jsx(t.Button,{label:Dy,variant:"outline",onClick:z,size:"small",prefixIcon:o.jsxRuntimeExports.jsx(ef,{})})})]}),o.jsxRuntimeExports.jsx(Gy,{companyNameSticky:$,"data-testid":t.generateDataTestId("health-monitor-list-container"),children:o.jsxRuntimeExports.jsxs(ol.Provider,{value:w,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:_,width:H})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{innerElementType:nl,height:_,width:H,ref:l,overscanCount:ao,itemSize:I,onItemsRendered:U=>u(U),itemData:{healthView:e,makeCompanyNameSticky:$,addThreadRequestThreadId:y,setElementRef:T,setAddThreadRequestThreadId:E,onRowClick:r,setNoteData:f},itemCount:e.companies.length,children:Vy})}),x!=null?o.jsxRuntimeExports.jsx(Jy,{"data-testid":t.generateDataTestId("health-monitor-notes-drawer"),children:o.jsxRuntimeExports.jsx(ot.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:"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:zy,replyComposerPlaceholder:Fy,threadResolve:_y,threadUnResolve:By},onThreadClick:_=>null,onCloseAllThreadsDrawer:()=>f(null)})})}):null]})})]})}const ol=p.createContext(void 0),Vy=({index:e,style:n,data:r})=>{const{healthView:i,makeCompanyNameSticky:a,onRowClick:c,addThreadRequestThreadId:l,setElementRef:d,setNoteData:u,setAddThreadRequestThreadId:m}=r,x=i.companies[e],{companyId:f}=x.companyInfo;return o.jsxRuntimeExports.jsx(Hy,{style:{...n,width:"fit-content",minWidth:"100%",padding:`${t.Space.sp0} ${t.Space.sp8} ${t.Space.sp3} ${t.Space.sp0}`},children:o.jsxRuntimeExports.jsx(M1,{companyView:i.companies[e],healthView:i,totalHeight:typeof n.height=="number"?n.height:De,companyNameSticky:a,addThreadRequestThreadId:l,setNoteData:u,setElementRef:d,setAddThreadRequestThreadId:m,onRowClick:c})},f)},nl=p.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:c,uiState:l,onColumnSortConfigChanged:d}=p.useContext(ol);return o.jsxRuntimeExports.jsxs(Ky,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx($y,{companyNameSticky:c,onColumnSortConfigChanged:d,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),o.jsxRuntimeExports.jsx(Yy,{children:r})]})});nl.displayName="Health Monitor view inner element type";const Uy=s.div`
|
|
2153
2153
|
width: 100%;
|
|
2154
2154
|
height: 100%;
|
|
2155
2155
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -2283,7 +2283,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2283
2283
|
display: inline-block;
|
|
2284
2284
|
}
|
|
2285
2285
|
}
|
|
2286
|
-
`,In={listItemHeightWithoutPadding:t.sp[10],listItemPadding:34,planAndAddonItemHeight:18},rl=e=>({height:e.subscriptions.reduce((i,a)=>i+(a.addOns?.length??0),0)*In.planAndAddonItemHeight+In.listItemPadding,collapsedHeight:De}),il=e=>({height:e.subscriptions.reduce((i,a)=>i+(a.plan!=null?1:0),0)*In.planAndAddonItemHeight+In.listItemPadding,collapsedHeight:De}),Nf=e=>{const n=rl(e),r=il(e);return n.height>r.height?n:r},ri=(e,n)=>{switch(n){case"plans":{const r=il(e);return r.height>r.collapsedHeight}case"addons":{const r=rl(e);return r.height>r.collapsedHeight}}},ct=t.appLocale.getLocalizedStrings(),{common:{strings:ko,due:Mf}}=ct,zf={status:ct.common.texts.status,group:ct.common.texts.group,plans:ct.common.texts.plans,controller:ct.common.texts.controller,customerSuccessManager:ct.common.texts.csManager,preparer:ct.common.texts.preparer,reviewer:ct.common.texts.reviewer,apAnalyst:ct.common.texts.apAnalyst,reportSent:ct.common.texts.date,taxStatus:ct.common.texts.status,taxLead:ct.common.texts.taxLead},Ff=({companyView:e,allUsers:n,rowIndex:r,companyNameSticky:i,isCollapsed:a,totalHeight:c,addThreadRequestThreadId:l,targetElementFromNavigation:d,resetTargetElementFromNavigation:u,setNoteData:m,setElementRef:x,setAddThreadRequestThreadId:f,onCollapseToggled:h,onCompanyNameClicked:S,onPassportIconClicked:j,onPlanOrAddOnClicked:g,changeHandlers:b})=>{const[C,y]=p.useState(null),E=t.useWindowSizeContext(),v=e.primarySubscription?.subscription,$=e.primarySubscription?.summary,I=e.primarySubscription?.summary.summary.tenantId,{companyId:w,name:T}=e.company.company.companyInfo,z=_f($?.schema?.recommendedAction??[]),B=Wf(e,n),H=`cockpit_${w}`,U="subscription.notes",{threads:K,isLoading:W}=t.useFilteredThreads({entityType:U,companyId:w},!1),{openThread:R,threads:A,addThread:_,removeThread:P,setOpenThread:k}=p.useContext(t.ThreadsContext),N=R!==null?A.get(R):null,V=R?.includes(w)===!0,ee=R!=null&&A.get(R)==null&&V,Y=l!=null&&A.get(l)?.metadata.companyId===w,Z={name:e.company.company.companyInfo.name,status:v?.subscription?.subscription?.status??{code:"",name:""},slabUpperLimit:v?.plan?.plan?.slabUpperLimit??{},slabLowerLimit:v?.plan?.plan?.slabLowerLimit??{},avg2MonthExpenses:$?.summary?.avg2MonthExpenses??{},totalDues:$?.summary?.totalDues??{},recommendedActionName:z[$?.summary?.recommendedActionCode??""]??"",recommendedActionCode:$?.summary?.recommendedActionCode??"",monthlyRecurringRevenue:$?.summary?.monthlyRecurringRevenue??{},...Bf(e.subscriptions)},Q=o.useForm({mode:"all"}),F="companyData",ue=(D,de)=>`${D}.${de}`,q=(D,de)=>{D===`${F}.controller`&&w!=null&&(de.users=Vf(de,D).users,b(w,de))};p.useEffect(()=>{const D=Q.watch((de,{name:le})=>{le!=null&&de.companyData!=null&&o.defer(()=>q(le,de.companyData))});return()=>{D.unsubscribe()}});const G=p.useCallback(()=>{R?.includes(t.NEW_THREAD_SUFFIX)===!0&&P(R),l!=null&&f(void 0)},[l,R,P,f]),ie=D=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:D.isElementThreadOpen??!1,isElementThreadPresent:D.isElementThreadPresent??!1,itemKey:D.itemKey,elementThreadId:D.elementThreadId??"",roomId:H,addThreadRequestThreadId:l,openThreadId:R,threadStyle:D.threadStyle,openThreadMetadata:N?.metadata??null,onElementClick:me,onAddThreadClick:je,targetElement:d??C}),ae=p.useCallback(D=>{if(D===R)k(null);else if(A.has(D))k(D);else if(D.includes(t.NEW_THREAD_SUFFIX)){const[de,le]=D.replace(t.NEW_THREAD_SUFFIX,"").split("."),xe=co(_t(de),J.toSubscriptionSortKeyType(le),w,T);_(D,{type:"thread",visibility:"public",id:D,roomId:H,createdAt:new Date,updatedAt:new Date,comments:[],metadata:xe,resolved:!1}),k(D)}},[w,T,R,A,_,k,H]),me=p.useCallback((D,de,le=!1)=>{const xe=Ft.find(L=>L.key===de);if(u(),xe!=null&&(D.type==="contextmenu"||le===!0)){if(xe.isThreadAllowed===!1)return;G(),D.preventDefault(),D.stopPropagation();const L=t.toCollaborationEntityType({tab:"subscription",key:xe.key});if(D.target instanceof HTMLElement||D.target instanceof SVGElement)if(le===!0&&D.target instanceof HTMLElement)y(D.target.parentElement);else if(D.target instanceof HTMLElement){const M=Zs(D.target,ne);y(M||D.target)}else{const M=D.target.closest(`.${ne}`);M instanceof HTMLElement&&y(M)}const ge=[...t.getFilteredThreads(A,{entityType:L,companyId:w},"both")],Te=ge.length>0&&ge[0].length>0?ge[0][0]:Le("subscription",xe.key,w);A.has(Te)?ae(Te):l===Te?f(void 0):(f(Te),k(null))}},[A,w,l,ae,f,k,u,G]),je=p.useCallback((D,de)=>{D.stopPropagation();const le=Le("subscription",de,w);f(void 0),ae(le)},[w,f,ae]);return o.jsxRuntimeExports.jsx(o.FormProvider,{...Q,children:o.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{u(),l!=null&&(f(void 0),l.includes(t.NEW_THREAD_SUFFIX)&&P(l))},children:o.jsxRuntimeExports.jsx(Gf,{windowSize:E,isThreadOpen:V||Y,totalHeight:c,isCreationInProgress:ee,children:Ft.map((D,de)=>{const le=t.toCollaborationEntityType({tab:"subscription",key:D.key}),xe=Ft.length-2<=de,L=[...t.getFilteredThreads(A,{entityType:le,companyId:w},"both")],ge=L.length>0&&L[0].length>0?L[0][0]:Le("subscription",D.key,w),Te=A.get(ge),M=Te!=null&&Te.resolved===!1,fe=ge===R,se=l===ge;switch(D.key){case"companyName":return o.jsxRuntimeExports.jsxs(Yf,{companyNameSticky:i,columnWidth:D.width,windowSize:E,isThreadOpen:fe||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),ref:te=>{x(w,D.key,te)},children:[o.jsxRuntimeExports.jsxs(Hf,{children:[o.jsxRuntimeExports.jsx(Kf,{onClick:te=>{te.preventDefault(),S(e)},children:Z.name}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:fe,targetElement:d??C,roomId:H,openThreadId:R,openThreadMetadata:N?.metadata??null})]}),o.jsxRuntimeExports.jsxs(Zf,{children:[o.jsxRuntimeExports.jsxs(qf,{onClick:te=>{te.preventDefault(),m({roomId:H,companyId:w,companyName:T,entityType:U})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:K.length,isLoading:W}),o.jsxRuntimeExports.jsx(e0,{})]}),o.jsxRuntimeExports.jsx(Xf,{onClick:te=>{te.preventDefault(),j(e)},children:o.jsxRuntimeExports.jsx(Qf,{className:"passportIcon"})})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:M,itemKey:D.key,style:{left:t.Space.sp4},onElementClick:me}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Le("subscription",D.key,w),addThreadRequestThreadId:l,itemKey:D.key,onAddThreadClick:je})]},ge);case"status":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[Z.status.code?o.jsxRuntimeExports.jsx(ci,{textColor:t.getCockpitColor(Z.status.code),children:Z.status.name.toUpperCase()}):ko.hyphen,ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"controller":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:ue(F,"controller"),value:B.controller,placeholderLabel:zf.controller,pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"plans":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(li,{children:Z.plansWithStatus.length>0?o.jsxRuntimeExports.jsx(si,{plansAndAddonNames:Z.plansWithStatus,isCollapsed:a,rowIndex:r,onCollapseToggled:h,showCollapseToggle:ri(e,"plans"),companyId:w,tenantId:I,onPlanOrAddOnClicked:g}):ko.hyphen}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"planLowerLimit":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(ns,{widthWrapper:D.width,windowSize:E,textColor:t.getCockpitColor("lowerLimit"),children:t.amountToString("0,0",Z.slabLowerLimit)}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"planHigherLimit":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(ns,{widthWrapper:D.width,windowSize:E,textColor:t.getCockpitColor("upperLimit"),children:t.amountToString("0,0",Z.slabUpperLimit)}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"avg2MonthExpenses":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(ns,{widthWrapper:D.width,windowSize:E,textColor:t.getCockpitColor("avg2MonthExpenses"),children:t.amountToString("0,0",Z.avg2MonthExpenses)}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"addons":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(li,{children:Z.addonsWithStatus.length>0?o.jsxRuntimeExports.jsx(si,{plansAndAddonNames:Z.addonsWithStatus,isCollapsed:a,rowIndex:r,onCollapseToggled:h,showCollapseToggle:ri(e,"addons"),companyId:w,tenantId:I,onPlanOrAddOnClicked:g}):ko.hyphen}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"upgradeStatus":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(ai,{children:Z.recommendedActionName?o.jsxRuntimeExports.jsx(ci,{textColor:t.getCockpitColor(Z.recommendedActionCode),onClick:te=>{te.preventDefault(),I!=null&&Z.recommendedActionCode==="upgrade"&&g(w,I)},code:Z.recommendedActionCode,children:Z.recommendedActionName}):ko.hyphen}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsxs(ai,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:t.amountToString("0,0",Z.monthlyRecurringRevenue)}),Z.totalDues.amount>0?o.jsxRuntimeExports.jsx(Jf,{children:t.amountToString("0,0",Z.totalDues).concat(ko.space).concat(Mf)}):null]}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);default:return null}})})})})})},Bf=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(c=>{n.addonsWithStatus.push({name:c.addOn.name,status:a})})}),n},_f=e=>{const n={};return e.reduce((i,a)=>(i[a.code]=a.name,i),n)};function Wf(e,n){return{controller:{allUsers:n,selectedUsers:e.controllers.map(r=>r.user)}}}function Vf(e,n){const r={};r.users=[];const i=n.split(".")[1],{selectedUsers:a,deSelectedUsers:c}=e[i];return c==null||c?.length==0?a.forEach(l=>{if(l.isUserSelectionUpdated===!0){const d=ii(i,l.userId,l.isRoleSelected);d!==void 0&&r.users?.push(d)}}):c.forEach(l=>{const d=ii(i,l.userId,l.isRoleSelected);d!==void 0&&r.users?.push(d)}),{users:r.users}}function Uf(e){return e==="controller"}function ii(e,n,r){if(Uf(e))return{isZeni:!0,role:e,userId:n,isSelected:r}}const Hf=s.div``,Kf=s(t.LargeMediumSp)`
|
|
2286
|
+
`,In={listItemHeightWithoutPadding:t.sp[10],listItemPadding:34,planAndAddonItemHeight:18},rl=e=>({height:e.subscriptions.reduce((i,a)=>i+(a.addOns?.length??0),0)*In.planAndAddonItemHeight+In.listItemPadding,collapsedHeight:De}),il=e=>({height:e.subscriptions.reduce((i,a)=>i+(a.plan!=null?1:0),0)*In.planAndAddonItemHeight+In.listItemPadding,collapsedHeight:De}),Nf=e=>{const n=rl(e),r=il(e);return n.height>r.height?n:r},ri=(e,n)=>{switch(n){case"plans":{const r=il(e);return r.height>r.collapsedHeight}case"addons":{const r=rl(e);return r.height>r.collapsedHeight}}},ct=t.appLocale.getLocalizedStrings(),{common:{strings:ko,due:Mf}}=ct,zf={status:ct.common.texts.status,group:ct.common.texts.group,plans:ct.common.texts.plans,controller:ct.common.texts.controller,customerSuccessManager:ct.common.texts.csManager,preparer:ct.common.texts.preparer,reviewer:ct.common.texts.reviewer,apAnalyst:ct.common.texts.apAnalyst,reportSent:ct.common.texts.date,taxStatus:ct.common.texts.status,taxLead:ct.common.texts.taxLead},Ff=({companyView:e,allUsers:n,rowIndex:r,companyNameSticky:i,isCollapsed:a,totalHeight:c,addThreadRequestThreadId:l,targetElementFromNavigation:d,resetTargetElementFromNavigation:u,setNoteData:m,setElementRef:x,setAddThreadRequestThreadId:f,onCollapseToggled:h,onCompanyNameClicked:S,onPassportIconClicked:j,onPlanOrAddOnClicked:g,changeHandlers:b})=>{const[C,y]=p.useState(null),E=t.useWindowSizeContext(),v=e.primarySubscription?.subscription,$=e.primarySubscription?.summary,I=e.primarySubscription?.summary.summary.tenantId,{companyId:w,name:T}=e.company.company.companyInfo,z=Bf($?.schema?.recommendedAction??[]),_=Wf(e,n),H=`cockpit_${w}`,U="subscription.notes",{threads:K,isLoading:W}=t.useFilteredThreads({entityType:U,companyId:w},!1),{openThread:R,threads:A,addThread:B,removeThread:P,setOpenThread:k}=p.useContext(t.ThreadsContext),N=R!==null?A.get(R):null,V=R?.includes(w)===!0,ee=R!=null&&A.get(R)==null&&V,Y=l!=null&&A.get(l)?.metadata.companyId===w,Z={name:e.company.company.companyInfo.name,status:v?.subscription?.subscription?.status??{code:"",name:""},slabUpperLimit:v?.plan?.plan?.slabUpperLimit??{},slabLowerLimit:v?.plan?.plan?.slabLowerLimit??{},avg2MonthExpenses:$?.summary?.avg2MonthExpenses??{},totalDues:$?.summary?.totalDues??{},recommendedActionName:z[$?.summary?.recommendedActionCode??""]??"",recommendedActionCode:$?.summary?.recommendedActionCode??"",monthlyRecurringRevenue:$?.summary?.monthlyRecurringRevenue??{},..._f(e.subscriptions)},Q=o.useForm({mode:"all"}),F="companyData",ue=(D,de)=>`${D}.${de}`,q=(D,de)=>{D===`${F}.controller`&&w!=null&&(de.users=Vf(de,D).users,b(w,de))};p.useEffect(()=>{const D=Q.watch((de,{name:le})=>{le!=null&&de.companyData!=null&&o.defer(()=>q(le,de.companyData))});return()=>{D.unsubscribe()}});const G=p.useCallback(()=>{R?.includes(t.NEW_THREAD_SUFFIX)===!0&&P(R),l!=null&&f(void 0)},[l,R,P,f]),ie=D=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:D.isElementThreadOpen??!1,isElementThreadPresent:D.isElementThreadPresent??!1,itemKey:D.itemKey,elementThreadId:D.elementThreadId??"",roomId:H,addThreadRequestThreadId:l,openThreadId:R,threadStyle:D.threadStyle,openThreadMetadata:N?.metadata??null,onElementClick:me,onAddThreadClick:je,targetElement:d??C}),ae=p.useCallback(D=>{if(D===R)k(null);else if(A.has(D))k(D);else if(D.includes(t.NEW_THREAD_SUFFIX)){const[de,le]=D.replace(t.NEW_THREAD_SUFFIX,"").split("."),xe=co(Bt(de),J.toSubscriptionSortKeyType(le),w,T);B(D,{type:"thread",visibility:"public",id:D,roomId:H,createdAt:new Date,updatedAt:new Date,comments:[],metadata:xe,resolved:!1}),k(D)}},[w,T,R,A,B,k,H]),me=p.useCallback((D,de,le=!1)=>{const xe=Ft.find(L=>L.key===de);if(u(),xe!=null&&(D.type==="contextmenu"||le===!0)){if(xe.isThreadAllowed===!1)return;G(),D.preventDefault(),D.stopPropagation();const L=t.toCollaborationEntityType({tab:"subscription",key:xe.key});if(D.target instanceof HTMLElement||D.target instanceof SVGElement)if(le===!0&&D.target instanceof HTMLElement)y(D.target.parentElement);else if(D.target instanceof HTMLElement){const M=Zs(D.target,ne);y(M||D.target)}else{const M=D.target.closest(`.${ne}`);M instanceof HTMLElement&&y(M)}const ge=[...t.getFilteredThreads(A,{entityType:L,companyId:w},"both")],Te=ge.length>0&&ge[0].length>0?ge[0][0]:Le("subscription",xe.key,w);A.has(Te)?ae(Te):l===Te?f(void 0):(f(Te),k(null))}},[A,w,l,ae,f,k,u,G]),je=p.useCallback((D,de)=>{D.stopPropagation();const le=Le("subscription",de,w);f(void 0),ae(le)},[w,f,ae]);return o.jsxRuntimeExports.jsx(o.FormProvider,{...Q,children:o.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{u(),l!=null&&(f(void 0),l.includes(t.NEW_THREAD_SUFFIX)&&P(l))},children:o.jsxRuntimeExports.jsx(Gf,{windowSize:E,isThreadOpen:V||Y,totalHeight:c,isCreationInProgress:ee,children:Ft.map((D,de)=>{const le=t.toCollaborationEntityType({tab:"subscription",key:D.key}),xe=Ft.length-2<=de,L=[...t.getFilteredThreads(A,{entityType:le,companyId:w},"both")],ge=L.length>0&&L[0].length>0?L[0][0]:Le("subscription",D.key,w),Te=A.get(ge),M=Te!=null&&Te.resolved===!1,fe=ge===R,se=l===ge;switch(D.key){case"companyName":return o.jsxRuntimeExports.jsxs(Yf,{companyNameSticky:i,columnWidth:D.width,windowSize:E,isThreadOpen:fe||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),ref:te=>{x(w,D.key,te)},children:[o.jsxRuntimeExports.jsxs(Hf,{children:[o.jsxRuntimeExports.jsx(Kf,{onClick:te=>{te.preventDefault(),S(e)},children:Z.name}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:fe,targetElement:d??C,roomId:H,openThreadId:R,openThreadMetadata:N?.metadata??null})]}),o.jsxRuntimeExports.jsxs(Zf,{children:[o.jsxRuntimeExports.jsxs(qf,{onClick:te=>{te.preventDefault(),m({roomId:H,companyId:w,companyName:T,entityType:U})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:K.length,isLoading:W}),o.jsxRuntimeExports.jsx(e0,{})]}),o.jsxRuntimeExports.jsx(Xf,{onClick:te=>{te.preventDefault(),j(e)},children:o.jsxRuntimeExports.jsx(Qf,{className:"passportIcon"})})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:M,itemKey:D.key,style:{left:t.Space.sp4},onElementClick:me}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Le("subscription",D.key,w),addThreadRequestThreadId:l,itemKey:D.key,onAddThreadClick:je})]},ge);case"status":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[Z.status.code?o.jsxRuntimeExports.jsx(ci,{textColor:t.getCockpitColor(Z.status.code),children:Z.status.name.toUpperCase()}):ko.hyphen,ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"controller":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:ue(F,"controller"),value:_.controller,placeholderLabel:zf.controller,pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"plans":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(li,{children:Z.plansWithStatus.length>0?o.jsxRuntimeExports.jsx(si,{plansAndAddonNames:Z.plansWithStatus,isCollapsed:a,rowIndex:r,onCollapseToggled:h,showCollapseToggle:ri(e,"plans"),companyId:w,tenantId:I,onPlanOrAddOnClicked:g}):ko.hyphen}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"planLowerLimit":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(ns,{widthWrapper:D.width,windowSize:E,textColor:t.getCockpitColor("lowerLimit"),children:t.amountToString("0,0",Z.slabLowerLimit)}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"planHigherLimit":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(ns,{widthWrapper:D.width,windowSize:E,textColor:t.getCockpitColor("upperLimit"),children:t.amountToString("0,0",Z.slabUpperLimit)}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"avg2MonthExpenses":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(ns,{widthWrapper:D.width,windowSize:E,textColor:t.getCockpitColor("avg2MonthExpenses"),children:t.amountToString("0,0",Z.avg2MonthExpenses)}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"addons":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(li,{children:Z.addonsWithStatus.length>0?o.jsxRuntimeExports.jsx(si,{plansAndAddonNames:Z.addonsWithStatus,isCollapsed:a,rowIndex:r,onCollapseToggled:h,showCollapseToggle:ri(e,"addons"),companyId:w,tenantId:I,onPlanOrAddOnClicked:g}):ko.hyphen}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"upgradeStatus":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsx(ai,{children:Z.recommendedActionName?o.jsxRuntimeExports.jsx(ci,{textColor:t.getCockpitColor(Z.recommendedActionCode),onClick:te=>{te.preventDefault(),I!=null&&Z.recommendedActionCode==="upgrade"&&g(w,I)},code:Z.recommendedActionCode,children:Z.recommendedActionName}):ko.hyphen}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);case"monthlyRecurringRevenue":return o.jsxRuntimeExports.jsxs(Rt,{ref:te=>{x(w,D.key,te)},columnWidth:D.width,windowSize:E,isThreadOpen:V||se,isThreadAllowed:D.isThreadAllowed,className:ne,onContextMenu:te=>me(te,D.key),children:[o.jsxRuntimeExports.jsxs(ai,{children:[o.jsxRuntimeExports.jsx(t.LargeRegular,{children:t.amountToString("0,0",Z.monthlyRecurringRevenue)}),Z.totalDues.amount>0?o.jsxRuntimeExports.jsx(Jf,{children:t.amountToString("0,0",Z.totalDues).concat(ko.space).concat(Mf)}):null]}),ie({isElementThreadOpen:fe,isElementThreadPresent:M,itemKey:D.key,elementThreadId:ge,threadStyle:xe?{right:t.Space.sp0}:void 0})]},ge);default:return null}})})})})})},_f=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(c=>{n.addonsWithStatus.push({name:c.addOn.name,status:a})})}),n},Bf=e=>{const n={};return e.reduce((i,a)=>(i[a.code]=a.name,i),n)};function Wf(e,n){return{controller:{allUsers:n,selectedUsers:e.controllers.map(r=>r.user)}}}function Vf(e,n){const r={};r.users=[];const i=n.split(".")[1],{selectedUsers:a,deSelectedUsers:c}=e[i];return c==null||c?.length==0?a.forEach(l=>{if(l.isUserSelectionUpdated===!0){const d=ii(i,l.userId,l.isRoleSelected);d!==void 0&&r.users?.push(d)}}):c.forEach(l=>{const d=ii(i,l.userId,l.isRoleSelected);d!==void 0&&r.users?.push(d)}),{users:r.users}}function Uf(e){return e==="controller"}function ii(e,n,r){if(Uf(e))return{isZeni:!0,role:e,userId:n,isSelected:r}}const Hf=s.div``,Kf=s(t.LargeMediumSp)`
|
|
2287
2287
|
word-break: break-word;
|
|
2288
2288
|
margin-right: 10px;
|
|
2289
2289
|
cursor: pointer;
|
|
@@ -2456,7 +2456,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2456
2456
|
`,rs=s.div`
|
|
2457
2457
|
width: ${e=>e.width.valuePx(e.windowSize)};
|
|
2458
2458
|
color: ${e=>e.textColor.color.toString()};
|
|
2459
|
-
`,{collaboration:{threads:{placeholder:{addANewComment:r0,replyAComment:i0},tooltip:{resolveComment:a0,unResolveComment:l0}}},common:{texts:{comments:c0}}}=t.appLocale.getLocalizedStrings(),d0={subscriptionRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},p0=({subscriptionView:e,onColumnSortConfigChanged:n,onCollapseToggled:r,onCompanyNameClicked:i,onPassportIconClicked:a,onPlanOrAddOnClicked:c,onScroll:l,changeHandlers:d,initialOpenThreadRequest:u})=>{const m=t.useWindowSizeContext(),x=p.useRef(null),[f,h]=p.useState(null),S=p.useRef(null),[j,g]=p.useState(null),b=!(m==="small"||m==="medium-compact");p.useEffect(()=>{x.current&&x.current.resetAfterIndex(0)},[e.uiState.isCollapsedByCompanyId,e.uiState.sortKey,e.uiState.sortOrder,e.companies.length]);const{uiState:C,totalMonthlyRecurringRevenue:y}=e,E=C.scrollYOffset??0,v=p.useCallback(A=>{const
|
|
2459
|
+
`,{collaboration:{threads:{placeholder:{addANewComment:r0,replyAComment:i0},tooltip:{resolveComment:a0,unResolveComment:l0}}},common:{texts:{comments:c0}}}=t.appLocale.getLocalizedStrings(),d0={subscriptionRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},p0=({subscriptionView:e,onColumnSortConfigChanged:n,onCollapseToggled:r,onCompanyNameClicked:i,onPassportIconClicked:a,onPlanOrAddOnClicked:c,onScroll:l,changeHandlers:d,initialOpenThreadRequest:u})=>{const m=t.useWindowSizeContext(),x=p.useRef(null),[f,h]=p.useState(null),S=p.useRef(null),[j,g]=p.useState(null),b=!(m==="small"||m==="medium-compact");p.useEffect(()=>{x.current&&x.current.resetAfterIndex(0)},[e.uiState.isCollapsedByCompanyId,e.uiState.sortKey,e.uiState.sortOrder,e.companies.length]);const{uiState:C,totalMonthlyRecurringRevenue:y}=e,E=C.scrollYOffset??0,v=p.useCallback(A=>{const B=e.companies[A].company.company.companyInfo.companyId;r(B,!e.uiState.isCollapsedByCompanyId[B])},[r,e.companies,e.uiState.isCollapsedByCompanyId]),$=p.useCallback(A=>{const B=e.companies[A].company.company.companyInfo.name.length,P=e.companies[A].company.company.companyInfo.companyId,k=Nf(e.companies[A]);return e.uiState.isCollapsedByCompanyId[P]?k.height:B>lo?De+32:De},[e.companies,e.uiState.isCollapsedByCompanyId]),{setOpenThread:I,setRequestToOpenThread:w,requestToOpenThread:T,isLoading:z}=p.useContext(t.ThreadsContext);p.useEffect(()=>{u!=null&&e.fetchState==="Completed"&&z===!1&&w(u)},[u,e.fetchState,z,w]);const[_,H]=p.useState(void 0),U=p.useRef([]),K=p.useMemo(()=>({makeCompanyNameSticky:b,uiState:C,totalMonthlyRecurringRevenue:y,onColumnSortConfigChanged:n}),[b,C,y,n]),W=p.useCallback((A,B,P)=>{const k=e.companies.findIndex(V=>V.company.company.companyInfo.companyId===A),N=Ft.findIndex(V=>V.key===B);k!==-1&&N!==-1&&(U.current[k]==null?U.current[k]=[P]:U.current[k][N]=P)},[e.companies]),R=p.useCallback(()=>{S.current=null,w(null)},[w]);return p.useEffect(()=>{if(T!=null&&f!=null){const{companyId:A,entityType:B}=T,[P,k]=B.split("."),N=e.companies.findIndex(Z=>Z.company.company.companyInfo.companyId===A),V=Ft.findIndex(Z=>Z.key===k);N!==-1&&!(f.visibleStartIndex<=N&&f.visibleStopIndex>=N)&&x.current?.scrollToItem(N,"center"),setTimeout(()=>{const Z=U.current[N]?.[0]?.getBoundingClientRect().bottom,Q=U.current[N]?.[0]?.getBoundingClientRect().top;if(Z!=null&&Q!=null&&(window.innerHeight>=Z&&window.innerHeight>=Q||Q<0)){const F=U.current[N][V];F!=null&&(S.current={companyId:A,target:F}),U.current[N][V]?.scrollIntoView({block:"center",behavior:"auto"})}},0);const Y=setInterval(()=>{const Z=U.current[N]?.[V]?.getBoundingClientRect().left,Q=U.current[N]?.[V]?.getBoundingClientRect().right,F=U.current[N]?.[V]?.offsetWidth;if(S.current?.companyId===A&&Z!=null&&F!=null&&Q!=null&&(Z<window.innerWidth-F||Q<window.innerWidth)){clearInterval(Y);const ue=T.threadId,q=T.onThreadShownCallback;ue&&(w(null),I(T.threadId),q?.())}},500);setTimeout(()=>{clearInterval(Y),w(null)},2e3)}},[T,f,I,w]),o.jsxRuntimeExports.jsx(m0,{children:o.jsxRuntimeExports.jsxs(al.Provider,{value:K,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:A,width:B})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:A,innerElementType:ll,itemCount:e.companies.length,itemSize:$,onItemsRendered:P=>h(P),itemData:{subscriptionView:e,makeCompanyNameSticky:b,addThreadRequestThreadId:_,targetElement:S.current?.target,resetTargetElementFromNavigation:R,setElementRef:W,setAddThreadRequestThreadId:H,onCompanyNameClicked:i,onPassportIconClicked:a,changeHandlers:d,setNoteData:g,onCollapseToggledHandler:v,onPlanOrAddOnClicked:c},width:B,overscanCount:ao,ref:x,onScroll:({scrollOffset:P})=>{l(P)},initialScrollOffset:E,children:u0})}),j!=null?o.jsxRuntimeExports.jsx(ot.RoomProvider,{id:j.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${j.companyName} ${c0}`,filter:{application:"cockpit",companyId:j.companyId,entityType:j.entityType,isGlobalComment:!1,tab:"subscription"},isLoading:!1,threadMetadata:{companyName:j.companyName,companyId:j.companyId,entityId:j.companyId,entityType:j.entityType,isGlobalComment:!1,application:"cockpit",tab:"subscription",url:window.location.href},textOverrides:{composerPlaceholder:r0,replyComposerPlaceholder:i0,threadResolve:a0,threadUnResolve:l0},onThreadClick:A=>null,onCloseAllThreadsDrawer:()=>g(null)})}):null]})})},al=p.createContext(void 0),ll=p.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:c,uiState:l,totalMonthlyRecurringRevenue:d,onColumnSortConfigChanged:u}=p.useContext(al);return o.jsxRuntimeExports.jsxs(x0,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(Rf,{companyNameSticky:c,onColumnSortConfigChanged:u,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),o.jsxRuntimeExports.jsx(g0,{children:r}),o.jsxRuntimeExports.jsx(t0,{companyNameSticky:c,totalMRRAmount:t.amountToString("0,0",d)})]})});ll.displayName="Subscription list view inner element type";const u0=({index:e,data:n,style:r})=>{const i=t.useWindowSizeContext(),{setNoteData:a,subscriptionView:c,makeCompanyNameSticky:l,addThreadRequestThreadId:d,targetElement:u,resetTargetElementFromNavigation:m,setElementRef:x,changeHandlers:f,onCompanyNameClicked:h,onPassportIconClicked:S,onPlanOrAddOnClicked:j,setAddThreadRequestThreadId:g,onCollapseToggledHandler:b}=n,C=c.companies[e],{companyId:y}=C.company.company.companyInfo,E=c.uiState.isCollapsedByCompanyId[y]===!0;return o.jsxRuntimeExports.jsx(h0,{isCollapsed:E,style:{...r,width:"fit-content",minWidth:"100%",padding:`${t.Space.sp0} ${d0.subscriptionRightPadding.valuePx(i)} ${t.Space.sp3} ${t.Space.sp0}`},children:o.jsxRuntimeExports.jsx(Ff,{companyView:c.companies[e],allUsers:c.zeniUsers.values,rowIndex:e,companyNameSticky:l,isCollapsed:E,onCollapseToggled:b,onCompanyNameClicked:h,onPassportIconClicked:S,onPlanOrAddOnClicked:j,changeHandlers:f,addThreadRequestThreadId:d,targetElementFromNavigation:u,resetTargetElementFromNavigation:m,setNoteData:a,setElementRef:x,setAddThreadRequestThreadId:g,totalHeight:typeof r.height=="number"?r.height:De})},y)},m0=s.div`
|
|
2460
2460
|
/** Subtract top so list can occupy remaining available height */
|
|
2461
2461
|
height: calc(100vh - 110px);
|
|
2462
2462
|
max-width: 99.9%;
|
|
@@ -2509,7 +2509,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2509
2509
|
`,O0=s.div`
|
|
2510
2510
|
display: flex;
|
|
2511
2511
|
flex-direction: column;
|
|
2512
|
-
`,N0=t.appLocale.getLocalizedStrings().common,cl={infoLabel:new t.ResponsiveSizedStyle("smallRegular","standardRegular"),selectFieldInput:new t.ResponsiveSizedStyle("standardRegular","largeRegular")},M0=({name:e,registerOptions:n,defaultValue:r,isDisabled:i,style:a,placeholder:c,valueToInfo:l,valueToId:d,showEmptyState:u,additionalLabelInfo:m,customStyleConfig:x,showDownChevronWithValue:f,customPlaceholderString:h,allowEmpty:S=!0,tooltip:j,menuPortal:g,disableCurrentOption:b})=>{const{control:C,formState:{errors:y,dirtyFields:E}}=o.useFormContext(),v=t.useWindowSizeContext(),$=o.useTheme(),[I,w]=p.useState(!1),T=o.has(E,e),z=o.has(y,e??""),
|
|
2512
|
+
`,N0=t.appLocale.getLocalizedStrings().common,cl={infoLabel:new t.ResponsiveSizedStyle("smallRegular","standardRegular"),selectFieldInput:new t.ResponsiveSizedStyle("standardRegular","largeRegular")},M0=({name:e,registerOptions:n,defaultValue:r,isDisabled:i,style:a,placeholder:c,valueToInfo:l,valueToId:d,showEmptyState:u,additionalLabelInfo:m,customStyleConfig:x,showDownChevronWithValue:f,customPlaceholderString:h,allowEmpty:S=!0,tooltip:j,menuPortal:g,disableCurrentOption:b})=>{const{control:C,formState:{errors:y,dirtyFields:E}}=o.useFormContext(),v=t.useWindowSizeContext(),$=o.useTheme(),[I,w]=p.useState(!1),T=o.has(E,e),z=o.has(y,e??""),_=p.useCallback(R=>({value:R.value,label:R.label,info:l?.(R.value)??"",id:d?.(R.value)??null,isDisabled:R.isDisabled,additionalNote:R?.additionalNote,isOptionRecommended:R.isOptionRecommended}),[l,d]),H=R=>R.map(A=>({label:A.label,options:A.options.map(B=>_(B))})),U=R=>{if(R==null||!R)return;let A=[];return r.allOptions.forEach(B=>{A=A.concat(B.options)}),{value:R,label:A.find(B=>B.value===R)?.label??R,info:l?.(R)??""}};if(u===!0&&I===!1&&T===!1&&!r.selectedOption&&i==null)return o.jsxRuntimeExports.jsx(t.ItemWithButton,{style:a,buttonTitle:N0.add,onClick:()=>w(!0),name:e});const K={...x,container:R=>({...R,width:"100%",...a}),menu:(R,A)=>({...R,backgroundColor:$.colors.grey5,borderRadius:"6px",whiteSpace:"nowrap",zIndex:2,width:"100%",margin:0,...x?.menu?.(R,A)}),menuList:(R,A)=>({...R,borderRadius:"6px",...x?.menuList?.(R,A)}),group:R=>({...R,borderBottom:`1px solid ${$.colors.grey3}`,paddingBottom:0}),control:(R,A)=>({...R,borderRadius:"6px",...x?.control?.(R,A)})},W={hasError:z,showDownChevronWithValue:f,customPlaceholderString:h};return o.jsxRuntimeExports.jsx(o.Controller,{name:e,control:C,defaultValue:r,rules:n,render:({field:{onChange:R,onBlur:A,value:B,ref:P}})=>{const k=B;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[p.createElement(o.StateManagedSelect$1,{...W,ref:P,isMulti:!1,isSearchable:!0,isClearable:!0,controlShouldRenderValue:!0,placeholder:c,value:U(k.selectedOption),options:H(k.allOptions),onChange:N=>{N==null||N?.value!=null&&k?.selectedOption===N.value?S===!0&&R({selectedOption:void 0,allOptions:k.allOptions}):R({selectedOption:N.value,allOptions:k.allOptions})},key:o.nanoid(),tabSelectsValue:!1,openMenuOnFocus:!0,classNamePrefix:"grouped-single-select-field",onBlur:A,menuPlacement:"auto",menuPortalTarget:g,maxMenuHeight:288,menuShouldScrollIntoView:!0,closeMenuOnSelect:!0,components:{Control:z0,Option:H0,Input:_0,Group:B0,GroupHeading:W0,SingleValue:N=>V0(N,j),ValueContainer:F0,DropdownIndicator:m2,IndicatorSeparator:x2,Placeholder:U0,ClearIndicator:h2},hideSelectedOptions:!1,styles:K,isDisabled:i!=null,isOptionDisabled:N=>b?.(N.value)??!1}),o.jsxRuntimeExports.jsx(s2,{size:v,children:m})]})}})},z0=e=>{const{menuIsOpen:n,isFocused:r,isDisabled:i,selectProps:a,data:c,options:l}=e,{value:d,hasError:u,customPlaceholderString:m}=a;let x=[];l.forEach(S=>{x=x.concat(S.options)});const f=x.find(S=>S.value===c?.value),h=t.useWindowSizeContext();return o.jsxRuntimeExports.jsx(X0,{title:m!=null&&d!=null?d.label:void 0,windowSize:h,menuIsOpen:n,isFocused:r,isDisabled:i,selectedValue:d,hasError:u,customPlaceholderString:m,isRecommended:f?.isOptionRecommended,children:o.jsxRuntimeExports.jsx(o.components.Control,{...e,className:"select-control",children:e.children})})},F0=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(Q0,{})}):null]})},_0=e=>{const{selectProps:n,innerRef:r,innerProps:i}=e,{placeholder:a,value:c,customPlaceholderString:l,menuIsOpen:d,onMenuOpen:u,hasError:m}=n;return l!=null&&c==null&&d===!1?o.jsxRuntimeExports.jsx(f2,{ref:r,...i,onClick:u,style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"flex-start",cursor:"pointer"},className:"custom-placeholder",children:o.jsxRuntimeExports.jsxs(g2,{children:[o.jsxRuntimeExports.jsx(S2,{hasError:m}),o.jsxRuntimeExports.jsx(y2,{hasError:m,children:l})]})}):o.jsxRuntimeExports.jsx(o.components.Input,{...e,autoComplete:"new-password",autoFocus:d,placeholder:c==null?a:void 0,children:e.children})},B0=e=>o.jsxRuntimeExports.jsx(o.components.Group,{...e,children:e.children}),W0=e=>{const[n,r]=p.useState(!0);return o.jsxRuntimeExports.jsx(r2,{className:"group-heading-container",isGroupOpen:n,onClick:()=>r(!n),children:o.jsxRuntimeExports.jsxs(o.components.GroupHeading,{...e,children:[o.jsxRuntimeExports.jsx(i2,{isGroupOpen:n,children:o.jsxRuntimeExports.jsx(a2,{className:"close-tick-icon"})}),e.children]})})},V0=({children:e,...n},r)=>{const i=r==null||n.selectProps.menuIsOpen===!0?e:r.sticky===!0?o.jsxRuntimeExports.jsx(K0,{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})},U0=()=>null,H0=e=>{const{data:n,isSelected:r,options:i,isDisabled:a,isFocused:c,selectProps:l}=e,{customPlaceholderString:d}=l;let u=[];i.forEach(x=>{u=u.concat(x.options)});const m=u.find(x=>x.value===n.value);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(q0,{title:d!=null?e.label:void 0,className:"select-option-wrapper",isFocused:c,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(J0,{children:[o.jsxRuntimeExports.jsxs(n2,{isSelected:r,children:[o.jsxRuntimeExports.jsx(e2,{isSelected:r,isDisabled:a,children:e.label}),c===!0&&m?.id!=null&&o.jsxRuntimeExports.jsx(u2,{children:m.id}),c===!0&&m?.info?o.jsxRuntimeExports.jsx(o2,{isSelected:!!r,children:m?.info}):null]}),m?.isOptionRecommended===!0?o.jsxRuntimeExports.jsx(p2,{}):null,r&&m?.additionalNote==null?o.jsxRuntimeExports.jsxs(l2,{children:[o.jsxRuntimeExports.jsx(c2,{className:"right-tick-icon"}),o.jsxRuntimeExports.jsx(d2,{className:"close-tick-icon"})]}):null]})})}),m?.isOptionRecommended===!0&&m.additionalNote!=null?o.jsxRuntimeExports.jsx(t2,{isSelected:r,isDisabled:a,children:m?.additionalNote}):null]})},K0=({children:e,title:n})=>o.jsxRuntimeExports.jsxs(G0,{children:[o.jsxRuntimeExports.jsxs(Y0,{children:[n,o.jsxRuntimeExports.jsx(Z0,{})]}),e]}),G0=s.div`
|
|
2513
2513
|
position: relative;
|
|
2514
2514
|
display: contents;
|
|
2515
2515
|
`,Y0=s.div`
|
|
@@ -2872,14 +2872,14 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
2872
2872
|
background-color: ${e=>e.theme.colors.grey3};
|
|
2873
2873
|
min-height: 1px;
|
|
2874
2874
|
max-height: 1px;
|
|
2875
|
-
`,jo=(e,n)=>{const{groups:r}=ml.dropDowns,i=[];return n!=null&&i.push({label:r.recommendedPlan,options:e.filter(a=>a.subscriptionPlanId===n).map(a=>({label:a.name,value:a.subscriptionPlanId}))}),i.push({label:r.allPlans,options:e.filter(a=>a.subscriptionPlanId!==n).map(a=>({label:a.name,value:a.subscriptionPlanId}))}),i},Pn=(e,n)=>e==null?void 0:`${(t.amountToString("0,0.00",e)+" "+N2(n)).trim()}`,N2=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}`},{common:Ln}=t.appLocale.getLocalizedStrings(),{texts:{review:M2}}=Ln,z2=Ln.texts.updatePlan,mi="subscriptionUpdatePlanPage",An="updatePlan",to="applyChanges";function F2(e){const n=t.useWindowSizeContext(),r=o.useTheme(),{localData:i,isDisabled:a,onSubscriptionDetailsChanged:c,onEstimateSuccess:l,onReviewClick:d,onBackClick:u,onResetClick:m}=e,[x,f]=p.useState(void 0),h=p.useRef(null),{data:S,subscriptionDetail:j,fetchState:g,estimateStatus:b}=i,C=t.usePrevious(b.fetchState),y=t.usePrevious(g),E=o.useForm({mode:"all",reValidateMode:"onChange",defaultValues:p.useMemo(()=>hi(i),[i])});p.useEffect(()=>()=>{f(void 0)},[]),p.useEffect(()=>{y==="In-Progress"&&g==="Completed"&&E.reset(hi(i))},[y,g,E,i]),p.useEffect(()=>{C==="In-Progress"&&(b.fetchState==="Error"?x!==b.fetchState&&f(b.fetchState):b.fetchState==="Completed"&&(f(void 0),l()))},[x,C,b.fetchState,l]);const v=async(U,K)=>{if(U.includes(An)||U.includes(to)){if(U.includes(to)){const{applyChanges:W}=K,{changeType:R,shouldProrate:A}=W;R==="applyImmediately"&&S?.applyEndOfTerm===!0&&A===!1?E.setValue(to,{...W,shouldProrate:!0},{shouldDirty:!0}):R==="applyEndOfTerm"&&S?.applyEndOfTerm===!1&&A===!0&&E.setValue(to,{...W,shouldProrate:!1},{shouldDirty:!0})}c(K)}};p.useEffect(()=>{const U=E.watch((K,{name:W})=>{W!=null&&K!=null&&o.defer(()=>v(W,K))});return()=>{U.unsubscribe()}});const $=E.handleSubmit(U=>{x!=null&&f(void 0),d()}),I=()=>z?.status.code!=="future"?o.jsxRuntimeExports.jsx(P0,{sectionId:to,style:{paddingBottom:t.Space.sp9},subscriptionUpdateData:S,subscriptionTermEndDate:z?.currentTerm?.end,isSubscriptionDetailsChanged:xl(i),isDisabled:a}):null,w={review:M2},T=j?.summary?.summary,z=j?.subscription.subscription,
|
|
2875
|
+
`,jo=(e,n)=>{const{groups:r}=ml.dropDowns,i=[];return n!=null&&i.push({label:r.recommendedPlan,options:e.filter(a=>a.subscriptionPlanId===n).map(a=>({label:a.name,value:a.subscriptionPlanId}))}),i.push({label:r.allPlans,options:e.filter(a=>a.subscriptionPlanId!==n).map(a=>({label:a.name,value:a.subscriptionPlanId}))}),i},Pn=(e,n)=>e==null?void 0:`${(t.amountToString("0,0.00",e)+" "+N2(n)).trim()}`,N2=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}`},{common:Ln}=t.appLocale.getLocalizedStrings(),{texts:{review:M2}}=Ln,z2=Ln.texts.updatePlan,mi="subscriptionUpdatePlanPage",An="updatePlan",to="applyChanges";function F2(e){const n=t.useWindowSizeContext(),r=o.useTheme(),{localData:i,isDisabled:a,onSubscriptionDetailsChanged:c,onEstimateSuccess:l,onReviewClick:d,onBackClick:u,onResetClick:m}=e,[x,f]=p.useState(void 0),h=p.useRef(null),{data:S,subscriptionDetail:j,fetchState:g,estimateStatus:b}=i,C=t.usePrevious(b.fetchState),y=t.usePrevious(g),E=o.useForm({mode:"all",reValidateMode:"onChange",defaultValues:p.useMemo(()=>hi(i),[i])});p.useEffect(()=>()=>{f(void 0)},[]),p.useEffect(()=>{y==="In-Progress"&&g==="Completed"&&E.reset(hi(i))},[y,g,E,i]),p.useEffect(()=>{C==="In-Progress"&&(b.fetchState==="Error"?x!==b.fetchState&&f(b.fetchState):b.fetchState==="Completed"&&(f(void 0),l()))},[x,C,b.fetchState,l]);const v=async(U,K)=>{if(U.includes(An)||U.includes(to)){if(U.includes(to)){const{applyChanges:W}=K,{changeType:R,shouldProrate:A}=W;R==="applyImmediately"&&S?.applyEndOfTerm===!0&&A===!1?E.setValue(to,{...W,shouldProrate:!0},{shouldDirty:!0}):R==="applyEndOfTerm"&&S?.applyEndOfTerm===!1&&A===!0&&E.setValue(to,{...W,shouldProrate:!1},{shouldDirty:!0})}c(K)}};p.useEffect(()=>{const U=E.watch((K,{name:W})=>{W!=null&&K!=null&&o.defer(()=>v(W,K))});return()=>{U.unsubscribe()}});const $=E.handleSubmit(U=>{x!=null&&f(void 0),d()}),I=()=>z?.status.code!=="future"?o.jsxRuntimeExports.jsx(P0,{sectionId:to,style:{paddingBottom:t.Space.sp9},subscriptionUpdateData:S,subscriptionTermEndDate:z?.currentTerm?.end,isSubscriptionDetailsChanged:xl(i),isDisabled:a}):null,w={review:M2},T=j?.summary?.summary,z=j?.subscription.subscription,_=j?.plan?.plan.subscriptionPlanId,H=T?.recommendedSubscriptionPlanId!=null&&_===T?.primarySubscriptionPlanId?T?.recommendedSubscriptionPlanId:void 0;return o.jsxRuntimeExports.jsxs(_2,{children:[o.jsxRuntimeExports.jsx(t.NavBar,{title:z2,backgroundColor:r.colors.grey4,style:{zIndex:3},onBackClick:u,scrollableContent:h,source:"SubscriptionUpdatePlanPage"}),x!=null?o.jsxRuntimeExports.jsx(t.SubscriptionSnackBar,{fetchState:x,customMessageText:b.error?.message??Ln.errorMessage.somethingWentWrongPleaseTryAgain,onRemoveSnackbar:()=>f(void 0)}):null,o.jsxRuntimeExports.jsx(W2,{ref:h,windowSize:n,children:g==="In-Progress"||g==="Not-Started"?o.jsxRuntimeExports.jsx(B2,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"Large",start:!0})}):o.jsxRuntimeExports.jsx(o.FormProvider,{...E,children:o.jsxRuntimeExports.jsxs("form",{id:xi(mi),onSubmit:$,children:[o.jsxRuntimeExports.jsx(A2,{sectionId:An,subscriptionUpdateData:S,recommendedSubscriptionPlanId:H,subscriptionMetaDetails:bo(i),isDisabled:a}),o.jsxRuntimeExports.jsx(I,{})]})})}),t.formHasDirtyFields(E.formState.dirtyFields)||V2(i)?o.jsxRuntimeExports.jsx(t.Footer,{formId:xi(mi),primaryBtn:{label:w.review,isLoading:b.fetchState==="In-Progress",isDisabled:e.isDisabled!=null&&b.fetchState!=="In-Progress"},cancelBtn:{label:Ln.cancel,shouldResetOnCancel:!0,onClick:()=>{E.reset(U2(i)),j!=null&&m(j)}}}):null]})}const _2=s.div`
|
|
2876
2876
|
display: flex;
|
|
2877
2877
|
min-height: 100%;
|
|
2878
2878
|
flex-direction: column;
|
|
2879
2879
|
width: 100%;
|
|
2880
2880
|
background-color: ${e=>e.theme.colors.grey4};
|
|
2881
2881
|
box-shadow: ${e=>`${t.Space.sp0} 2px ${t.Space.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
2882
|
-
`,
|
|
2882
|
+
`,B2=s.div`
|
|
2883
2883
|
display: flex;
|
|
2884
2884
|
width: 100%;
|
|
2885
2885
|
height: calc(100vh - 110px);
|
|
@@ -3000,7 +3000,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3000
3000
|
&:hover {
|
|
3001
3001
|
color: ${e=>e.theme.colors.primary};
|
|
3002
3002
|
}
|
|
3003
|
-
`,hl=t.appLocale.getLocalizedStrings(),{common:{texts:{runway:IC}}}=hl,{common:{strings:PC}}=hl,LC=({companyView:e,companyNameSticky:n,totalHeight:r,addThreadRequestThreadId:i,setNoteData:a,setElementRef:c,setAddThreadRequestThreadId:l,onCompanyNameClicked:d,onPassportIconClicked:u})=>{const m=t.useWindowSizeContext(),{accountingSummary:x,company:f}=e,{companyId:h,name:S}=f.company.companyInfo,j=`cockpit_${h}`,g="portfolio.notes",{threads:b,isLoading:C}=t.useFilteredThreads({entityType:g,companyId:h},!1),{openThread:y,threads:E,addThread:v,removeThread:$,setOpenThread:I,setRequestToOpenThread:w}=p.useContext(t.ThreadsContext),T=p.useRef(null),z=y!==null?E.get(y):null,
|
|
3003
|
+
`,hl=t.appLocale.getLocalizedStrings(),{common:{texts:{runway:IC}}}=hl,{common:{strings:PC}}=hl,LC=({companyView:e,companyNameSticky:n,totalHeight:r,addThreadRequestThreadId:i,setNoteData:a,setElementRef:c,setAddThreadRequestThreadId:l,onCompanyNameClicked:d,onPassportIconClicked:u})=>{const m=t.useWindowSizeContext(),{accountingSummary:x,company:f}=e,{companyId:h,name:S}=f.company.companyInfo,j=`cockpit_${h}`,g="portfolio.notes",{threads:b,isLoading:C}=t.useFilteredThreads({entityType:g,companyId:h},!1),{openThread:y,threads:E,addThread:v,removeThread:$,setOpenThread:I,setRequestToOpenThread:w}=p.useContext(t.ThreadsContext),T=p.useRef(null),z=y!==null?E.get(y):null,_=y?.includes(h)===!0,H=y!=null&&E.get(y)==null&&_,U=i!=null&&E.get(i)?.metadata.companyId===h,K=p.useCallback(()=>{y?.includes(t.NEW_THREAD_SUFFIX)===!0&&$(y),i!=null&&l(void 0)},[i,y,$,l]),W=k=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:k.isElementThreadOpen??!1,isElementThreadPresent:k.isElementThreadPresent??!1,itemKey:k.itemKey,elementThreadId:k.elementThreadId??"",roomId:j,addThreadRequestThreadId:i,openThreadId:y,threadStyle:k.threadStyle,openThreadMetadata:z?.metadata??null,onElementClick:A,onAddThreadClick:B}),R=p.useCallback(k=>{if(k===y)I(null);else if(E.has(k))I(k);else if(k.includes(t.NEW_THREAD_SUFFIX)){const[N,V]=k.replace(t.NEW_THREAD_SUFFIX,"").split("."),ee=co(Bt(N),J.toPortfolioSortKeyType(V),h,S);v(k,{type:"thread",visibility:"public",id:k,roomId:j,createdAt:new Date,updatedAt:new Date,comments:[],metadata:ee,resolved:!1}),I(k)}},[h,S,y,j,E,v,I]),A=p.useCallback((k,N,V=!1)=>{const ee=so.find(Y=>Y.key===N);if(w(null),ee!=null&&(k.type==="contextmenu"||V===!0)){if(ee.isThreadAllowed===!1)return;K(),k.preventDefault(),k.stopPropagation();const Y=t.toCollaborationEntityType({tab:"portfolio",key:ee.key}),Z=[...t.getFilteredThreads(E,{entityType:Y,companyId:h},"both")],Q=Z.length>0&&Z[0].length>0?Z[0][0]:Le("portfolio",ee.key,h);E.has(Q)?R(Q):i===Q?l(void 0):(l(Q),I(null))}},[E,h,i,R,l,I,w,K]),B=p.useCallback((k,N)=>{k.stopPropagation();const V=Le("portfolio",N,h);l(void 0),R(V)},[h,l,R]),P={name:e.company.company.companyInfo.name,runway:x.runway,cashBalance:x.cashPosition?.balance,expenses:x.cogs?.balance&&x.expenses?.balance?AC(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)&&$(i))},children:o.jsxRuntimeExports.jsx(DC,{windowSize:m,isThreadOpen:_||U,totalHeight:r,isCreationInProgress:H,children:so.map((k,N)=>{const V=t.toCollaborationEntityType({tab:"portfolio",key:k.key}),ee=[...t.getFilteredThreads(E,{entityType:V,companyId:h},"both")],Y=so.length-2<=N,Z=ee.length>0&&ee[0].length>0?ee[0][0]:Le("portfolio",k.key,h),Q=E.get(Z),F=Q!=null&&Q.resolved===!1,ue=Z===y,q=i===Z;switch(k.key){case"companyName":return o.jsxRuntimeExports.jsxs(WC,{companyNameSticky:n,columnWidth:k.width,windowSize:m,isThreadOpen:ue||q,isThreadAllowed:k.isThreadAllowed,className:ne,onContextMenu:G=>A(G,k.key),ref:G=>{c(h,k.key,G)},children:[o.jsxRuntimeExports.jsxs(OC,{ref:T,children:[o.jsxRuntimeExports.jsx(NC,{onClick:G=>{G.preventDefault(),d(e)},children:P.name}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{anchorRef:T,isElementThreadOpen:ue,roomId:j,openThreadId:y,openThreadMetadata:z?.metadata??null})]}),o.jsxRuntimeExports.jsxs(zC,{children:[o.jsxRuntimeExports.jsxs(FC,{onClick:G=>{G.preventDefault(),a({roomId:j,companyId:h,companyName:S,entityType:g})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:b.length,isLoading:C}),o.jsxRuntimeExports.jsx(_C,{})]}),o.jsxRuntimeExports.jsx(BC,{onClick:G=>{G.preventDefault(),u(e)},children:o.jsxRuntimeExports.jsx(MC,{className:"passportIcon"})})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:F,itemKey:k.key,style:{left:t.Space.sp4},onElementClick:A}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Le("portfolio",k.key,h),addThreadRequestThreadId:i,itemKey:k.key,onAddThreadClick:B})]},Z);case"cashBalance":return o.jsxRuntimeExports.jsxs(Io,{ref:G=>{c(h,k.key,G)},columnWidth:k.width,windowSize:m,isThreadAllowed:k.isThreadAllowed,className:ne,onContextMenu:G=>A(G,k.key),children:[o.jsxRuntimeExports.jsx(hn,{textColor:t.getCockpitColor("cashBalance"),wrapperWidth:k.width,windowSize:m,children:t.amountToString("0,0",P.cashBalance)}),W({isElementThreadOpen:ue,isElementThreadPresent:F,itemKey:k.key,elementThreadId:Z,threadStyle:Y?{right:t.Space.sp0}:void 0})]},Z);case"expenses":return o.jsxRuntimeExports.jsxs(Io,{ref:G=>{c(h,k.key,G)},columnWidth:k.width,windowSize:m,isThreadAllowed:k.isThreadAllowed,className:ne,onContextMenu:G=>A(G,k.key),children:[o.jsxRuntimeExports.jsx(hn,{textColor:t.getCockpitColor("expenses"),wrapperWidth:k.width,windowSize:m,children:t.amountToString("0,0",P.expenses)}),W({isElementThreadOpen:ue,isElementThreadPresent:F,itemKey:k.key,elementThreadId:Z,threadStyle:Y?{right:t.Space.sp0}:void 0})]},Z);case"revenues":return o.jsxRuntimeExports.jsxs(Io,{ref:G=>{c(h,k.key,G)},columnWidth:k.width,windowSize:m,isThreadAllowed:k.isThreadAllowed,className:ne,onContextMenu:G=>A(G,k.key),children:[o.jsxRuntimeExports.jsx(hn,{textColor:t.getCockpitColor("revenues"),wrapperWidth:k.width,windowSize:m,children:t.amountToString("0,0",P.revenues)}),W({isElementThreadOpen:ue,isElementThreadPresent:F,itemKey:k.key,elementThreadId:Z,threadStyle:Y?{right:t.Space.sp0}:void 0})]},Z);case"netIncome":return o.jsxRuntimeExports.jsxs(Io,{ref:G=>{c(h,k.key,G)},columnWidth:k.width,windowSize:m,isThreadAllowed:k.isThreadAllowed,className:ne,onContextMenu:G=>A(G,k.key),children:[o.jsxRuntimeExports.jsx(hn,{textColor:t.getCockpitColor("netIncome"),wrapperWidth:k.width,windowSize:m,children:t.amountToString("0,0",P.netIncome)}),W({isElementThreadOpen:ue,isElementThreadPresent:F,itemKey:k.key,elementThreadId:Z,threadStyle:Y?{right:t.Space.sp0}:void 0})]},Z);case"runway":return o.jsxRuntimeExports.jsxs(Io,{ref:G=>{c(h,k.key,G)},columnWidth:k.width,windowSize:m,isThreadAllowed:k.isThreadAllowed,className:ne,onContextMenu:G=>A(G,k.key),children:[o.jsxRuntimeExports.jsx(VC,{wrapperWidth:k.width,windowSize:m,children:P.runway!=null?o.jsxRuntimeExports.jsx(t.Tooltip,{variant:"runway",data:P.runway,placement:"right",title:IC,children:o.jsxRuntimeExports.jsx(HC,{textColor:t.getCockpitColor(P.runway.runwayStatusCode)})}):o.jsxRuntimeExports.jsx(UC,{children:PC.hyphen})}),W({isElementThreadOpen:ue,isElementThreadPresent:F,itemKey:k.key,elementThreadId:Z,threadStyle:Y?{right:t.Space.sp0}:void 0})]},Z);default:return null}})})})},AC=(e,n)=>({amount:e.amount+n.amount,currencyCode:e.currencyCode,currencySymbol:e.currencySymbol}),DC=s.div`
|
|
3004
3004
|
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
3005
3005
|
border-radius: ${t.Space.sp2};
|
|
3006
3006
|
display: flex;
|
|
@@ -3072,13 +3072,13 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3072
3072
|
&:hover {
|
|
3073
3073
|
color: ${e=>e.theme.colors.primary};
|
|
3074
3074
|
}
|
|
3075
|
-
`,
|
|
3075
|
+
`,_C=s(po)`
|
|
3076
3076
|
display: flex;
|
|
3077
3077
|
width: ${t.Space.sp4};
|
|
3078
3078
|
height: ${t.Space.sp4};
|
|
3079
3079
|
align-items: center;
|
|
3080
3080
|
justify-content: center;
|
|
3081
|
-
`,
|
|
3081
|
+
`,BC=s.div`
|
|
3082
3082
|
background-color: ${e=>e.theme.colors.grey5};
|
|
3083
3083
|
box-sizing: border-box;
|
|
3084
3084
|
height: ${t.Space.sp4};
|
|
@@ -3155,7 +3155,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3155
3155
|
color: ${e=>e.textColor.color.toString()};
|
|
3156
3156
|
`,hs=s(t.StandardRegular)`
|
|
3157
3157
|
color: ${e=>e.theme.colors.champion};
|
|
3158
|
-
`,ho=s.div``,{collaboration:{threads:{placeholder:{addANewComment:JC,replyAComment:ej},tooltip:{resolveComment:tj,unResolveComment:oj}}},common:{texts:{comments:nj}}}=t.appLocale.getLocalizedStrings(),sj={portfolioRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},rj=({portfolioView:e,onColumnSortConfigChanged:n,onCompanyNameClicked:r,onPassportIconClicked:i,onScroll:a,initialOpenThreadRequest:c})=>{const l=t.useWindowSizeContext(),d=p.useRef(null),[u,m]=p.useState(null),[x,f]=p.useState(null),h=!(l==="small"||l==="medium-compact"),{uiState:S,totalCashBalance:j,totalExpenses:g,totalRevenues:b}=e,C=S.scrollYOffset??0,y=U=>e.companies[U].company.company.companyInfo.name.length>lo?De+32:De;p.useEffect(()=>{d.current&&d.current.resetAfterIndex(0)},[e]);const{setOpenThread:E,setRequestToOpenThread:v,requestToOpenThread:$,isLoading:I}=p.useContext(t.ThreadsContext);p.useEffect(()=>{c!=null&&e.fetchState==="Completed"&&I===!1&&v(c)},[c,e.fetchState,I,v]);const[w,T]=p.useState(void 0),z=p.useRef([]),
|
|
3158
|
+
`,ho=s.div``,{collaboration:{threads:{placeholder:{addANewComment:JC,replyAComment:ej},tooltip:{resolveComment:tj,unResolveComment:oj}}},common:{texts:{comments:nj}}}=t.appLocale.getLocalizedStrings(),sj={portfolioRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},rj=({portfolioView:e,onColumnSortConfigChanged:n,onCompanyNameClicked:r,onPassportIconClicked:i,onScroll:a,initialOpenThreadRequest:c})=>{const l=t.useWindowSizeContext(),d=p.useRef(null),[u,m]=p.useState(null),[x,f]=p.useState(null),h=!(l==="small"||l==="medium-compact"),{uiState:S,totalCashBalance:j,totalExpenses:g,totalRevenues:b}=e,C=S.scrollYOffset??0,y=U=>e.companies[U].company.company.companyInfo.name.length>lo?De+32:De;p.useEffect(()=>{d.current&&d.current.resetAfterIndex(0)},[e]);const{setOpenThread:E,setRequestToOpenThread:v,requestToOpenThread:$,isLoading:I}=p.useContext(t.ThreadsContext);p.useEffect(()=>{c!=null&&e.fetchState==="Completed"&&I===!1&&v(c)},[c,e.fetchState,I,v]);const[w,T]=p.useState(void 0),z=p.useRef([]),_=p.useMemo(()=>({makeCompanyNameSticky:h,uiState:S,totalCashBalance:j,totalExpenses:g,totalRevenues:b,onColumnSortConfigChanged:n}),[h,j,g,b,S,n]),H=p.useCallback((U,K,W)=>{const R=e.companies.findIndex(B=>B.company.company.companyInfo.companyId===U),A=so.findIndex(B=>B.key===K);R!==-1&&A!==-1&&(z.current[R]==null?z.current[R]=[W]:z.current[R][A]=W)},[e.companies]);return p.useEffect(()=>{if($!=null&&u!=null){const{companyId:U,entityType:K}=$,[W,R]=K.split("."),A=e.companies.findIndex(N=>N.company.company.companyInfo.companyId===U),B=so.findIndex(N=>N.key===R);A!==-1&&!(u.visibleStartIndex<=A&&u.visibleStopIndex>=A)&&d.current?.scrollToItem(A,"center"),setTimeout(()=>{const N=z.current[A]?.[0]?.getBoundingClientRect().bottom,V=z.current[A]?.[0]?.getBoundingClientRect().top;N!=null&&V!=null&&(window.innerHeight>=N&&window.innerHeight>=V||V<0)&&z.current[A][B]?.scrollIntoView({block:"center",behavior:"auto"})},0);const k=setInterval(()=>{const N=z.current[A]?.[B]?.getBoundingClientRect().left,V=z.current[A]?.[B]?.getBoundingClientRect().right,ee=z.current[A]?.[B]?.offsetWidth;if(N!=null&&ee!=null&&V!=null&&(N<window.innerWidth-ee||V<window.innerWidth)){clearInterval(k);const Y=$.threadId,Z=$.onThreadShownCallback;Y&&(v(null),E($.threadId),Z?.())}},500);setTimeout(()=>{clearInterval(k),v(null)},2e3)}},[$,u,E,v]),o.jsxRuntimeExports.jsxs(aj,{companyNameSticky:h,children:[h&&o.jsxRuntimeExports.jsx(gl,{totalCashBalance:j,totalExpenses:g,totalRevenues:b,companyNameSticky:h}),o.jsxRuntimeExports.jsx(lj,{companyNameSticky:h,children:o.jsxRuntimeExports.jsxs(Sl.Provider,{value:_,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:U,width:K})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:U,innerElementType:yl,itemCount:e.companies.length,itemSize:y,onItemsRendered:W=>m(W),itemData:{portfolioView:e,makeCompanyNameSticky:h,addThreadRequestThreadId:w,setElementRef:H,setAddThreadRequestThreadId:T,setNoteData:f,onCompanyNameClicked:r,onPassportIconClicked:i},width:K,ref:d,overscanCount:ao,onScroll:({scrollOffset:W})=>{a(W)},initialScrollOffset:C,children:ij})}),x!=null?o.jsxRuntimeExports.jsx(ot.RoomProvider,{id:x.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${x.companyName} ${nj}`,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:JC,replyComposerPlaceholder:ej,threadResolve:tj,threadUnResolve:oj},onThreadClick:U=>null,onCloseAllThreadsDrawer:()=>f(null)})}):null]})})]})},Sl=p.createContext(void 0),ij=({index:e,style:n,data:r})=>{const i=t.useWindowSizeContext(),{portfolioView:a,makeCompanyNameSticky:c,addThreadRequestThreadId:l,setElementRef:d,setNoteData:u,onCompanyNameClicked:m,onPassportIconClicked:x,setAddThreadRequestThreadId:f}=r,h=a.companies[e],{companyId:S}=h.company.company.companyInfo;return o.jsxRuntimeExports.jsx(cj,{style:{...n,width:"fit-content",minWidth:"100%",padding:`${t.Space.sp0} ${sj.portfolioRightPadding.valuePx(i)} ${t.Space.sp3} ${t.Space.sp0}`},children:o.jsxRuntimeExports.jsx(LC,{addThreadRequestThreadId:l,setNoteData:u,setElementRef:d,setAddThreadRequestThreadId:f,totalHeight:typeof n.height=="number"?n.height:De,companyView:a.companies[e],companyNameSticky:c,onCompanyNameClicked:m,onPassportIconClicked:x})},S)},yl=p.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:c,uiState:l,totalCashBalance:d,totalExpenses:u,totalRevenues:m,onColumnSortConfigChanged:x}=p.useContext(Sl);return o.jsxRuntimeExports.jsxs(pj,{ref:n,style:{...i,width:"auto"},...a,children:[!c&&o.jsxRuntimeExports.jsx(gl,{totalCashBalance:d,totalExpenses:u,totalRevenues:m,companyNameSticky:c}),o.jsxRuntimeExports.jsx(RC,{companyNameSticky:c,onColumnSortConfigChanged:x,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),o.jsxRuntimeExports.jsx(dj,{children:r})]})});yl.displayName="Portfolio list view inner element type";const aj=s.div`
|
|
3159
3159
|
width: 100%;
|
|
3160
3160
|
height: 100%;
|
|
3161
3161
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -3212,7 +3212,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3212
3212
|
outline: none;
|
|
3213
3213
|
border-color: ${e=>e.theme.colors.primary};
|
|
3214
3214
|
}
|
|
3215
|
-
`,{aiAccountantCustomer:
|
|
3215
|
+
`,{aiAccountantCustomer:_s,common:{failed:Rj,oauthConsent:{company:$j},status:{pending:Ej},texts:{lastSync:vj,lastTraining:wj,live:kj,offboarded:Tj,onboarding:Ij,status:Pj}}}=t.appLocale.getLocalizedStrings(),ye={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},dt={companyName:200,status:120,bookcloseDate:130,latestTraining:130,latestSync:130,accuracy:100,actions:60},Lj=[{key:"companyName",label:$j,sortable:!0,width:dt.companyName,justifyContent:"flex-start",growToFill:!0},{key:"status",label:Pj,sortable:!0,width:dt.status,justifyContent:"flex-start"},{key:"bookcloseDate",label:_s.table.bookClose,sortable:!0,width:dt.bookcloseDate,justifyContent:"flex-start"},{key:"latestTraining",label:wj,sortable:!0,width:dt.latestTraining,justifyContent:"flex-start"},{key:"latestSync",label:vj,sortable:!0,width:dt.latestSync,justifyContent:"flex-start"},{key:"accuracy",label:_s.table.accuracy,sortable:!0,width:dt.accuracy,justifyContent:"flex-end"},{key:"actions",label:"",sortable:!1,width:dt.actions,justifyContent:"center"}],tr={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}},fl=(e,n)=>{const{jobTriggerDialog:r}=_s;return e==="offboard"?r.singleDescriptionOffboard.replace("__companyName__",n):r.singleDescription.replace("__companyName__",n).replace("__datesInstruction__",r.datesInstruction)},or=e=>J.getAllowedOperationsForStatus(e).map(n=>({operationType:n,...tr[n]})),Cl=e=>({active:kj,pending:Ej,onboarding:Ij,offboarded:Tj,failed:Rj})[e]??e;function nr(){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:yo,texts:{actions:Aj,by:Dj,created:Oj,lastSync:Nj,lastTraining:Mj,offboarded:zj,status:Ri}},dateFormat:kn,timeFormat:Vo,aiAccountantCustomer:$t}=t.appLocale.getLocalizedStrings(),Fj=({customer:e,hasMoreJobs:n,jobs:r,jobsFetchStatus:i,onAction:a,onCancelOnboarding:c,onClose:l,onLoadMoreJobs:d})=>{const[u,m]=p.useState(null),x=nr(),f=e.enrollment?.status??"unknown",h=e.enrollment,S=h?.accuracy??{},j=i.fetchState==="In-Progress",g=E=>{m({operationType:E})},b=(E,v,$)=>{a(e,E,v,$),m(null)},C=E=>E<r.length,y=()=>{n&&!j&&d()};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(Vj,{children:[o.jsxRuntimeExports.jsx(Uj,{children:o.jsxRuntimeExports.jsxs(Hj,{children:[o.jsxRuntimeExports.jsx(Kj,{}),o.jsxRuntimeExports.jsxs(Gj,{children:[o.jsxRuntimeExports.jsx(Yj,{children:e.companyName}),o.jsxRuntimeExports.jsx(Zj,{children:e.tenantId})]}),o.jsxRuntimeExports.jsx(Xj,{onClick:l,children:o.jsxRuntimeExports.jsx(Qj,{})})]})}),o.jsxRuntimeExports.jsxs(qj,{children:[o.jsxRuntimeExports.jsxs(gs,{children:[o.jsxRuntimeExports.jsx(Sn,{children:$t.drawer.enrollmentDetails}),o.jsxRuntimeExports.jsxs(e3,{children:[o.jsxRuntimeExports.jsxs(Po,{children:[o.jsxRuntimeExports.jsx(Lo,{children:Ri}),o.jsxRuntimeExports.jsx(Ao,{children:Cl(f)})]}),o.jsxRuntimeExports.jsxs(Po,{children:[o.jsxRuntimeExports.jsx(Lo,{children:$t.drawer.onboarded}),o.jsxRuntimeExports.jsx(Ao,{title:h?.onboardedAt!=null?h.onboardedAt.format(Vo.hmmADashDDMMMCommaYYYY):void 0,children:h?.onboardedAt!=null?h.onboardedAt.format(kn.visual.MMMDCommaYYYYformat):yo.emDash})]}),o.jsxRuntimeExports.jsxs(Po,{children:[o.jsxRuntimeExports.jsx(Lo,{children:Mj}),o.jsxRuntimeExports.jsx(Ao,{title:h?.latestTraining!=null?h.latestTraining.format(Vo.hmmADashDDMMMCommaYYYY):void 0,children:h?.latestTraining!=null?h.latestTraining.format(kn.visual.MMMDCommaYYYYformat):yo.emDash})]}),o.jsxRuntimeExports.jsxs(Po,{children:[o.jsxRuntimeExports.jsx(Lo,{children:Nj}),o.jsxRuntimeExports.jsx(Ao,{title:h?.latestTransactionSync!=null?h.latestTransactionSync.local().format(Vo.hmmADashDDMMMCommaYYYY):void 0,children:h?.latestTransactionSync!=null?h.latestTransactionSync.utc(!0).fromNow():yo.emDash})]}),h?.offboardedAt!=null&&o.jsxRuntimeExports.jsxs(Po,{children:[o.jsxRuntimeExports.jsx(Lo,{children:zj}),o.jsxRuntimeExports.jsx(Ao,{title:h.offboardedAt.format(Vo.hmmADashDDMMMCommaYYYY),children:h.offboardedAt.format(kn.visual.MMMDCommaYYYYformat)})]})]})]}),o.jsxRuntimeExports.jsxs(gs,{children:[o.jsxRuntimeExports.jsx(Sn,{children:$t.drawer.modelAccuracy}),Object.keys(S).length>0?o.jsxRuntimeExports.jsx(t3,{children:Object.entries(S).map(([E,v])=>{const $=v*100,I=Bj($),w=`${$.toFixed(0)}${yo.percentage}`,T=`${$.toFixed(1)}${yo.percentage}`;return o.jsxRuntimeExports.jsxs(o3,{children:[o.jsxRuntimeExports.jsx(n3,{children:Wj(E)}),o.jsxRuntimeExports.jsx(s3,{children:o.jsxRuntimeExports.jsx(r3,{style:{width:w,backgroundColor:I}})}),o.jsxRuntimeExports.jsx(i3,{children:T})]},E)})}):o.jsxRuntimeExports.jsx($i,{children:$t.drawer.noAccuracyData})]}),x&&o.jsxRuntimeExports.jsxs(gs,{children:[o.jsxRuntimeExports.jsx(Sn,{children:Aj}),o.jsxRuntimeExports.jsx(a3,{children:or(f).map(E=>o.jsxRuntimeExports.jsx(t.Button,{label:$t.actions[E.labelKey],variant:E.destructive?"destructive":"outline",size:"small",onClick:()=>{E.operationType==="cancel_onboarding"?c(e):g(E.operationType)}},E.operationType))})]}),o.jsxRuntimeExports.jsxs(Jj,{children:[o.jsxRuntimeExports.jsx(Sn,{children:$t.drawer.jobHistory}),r.length===0&&!j?o.jsxRuntimeExports.jsx($i,{children:$t.drawer.noJobsFound}):o.jsxRuntimeExports.jsxs(l3,{children:[o.jsxRuntimeExports.jsxs(c3,{children:[o.jsxRuntimeExports.jsx(d3,{children:o.jsxRuntimeExports.jsx(t.ExtraSmallSemiBold,{children:$t.drawer.operation})}),o.jsxRuntimeExports.jsx(p3,{children:o.jsxRuntimeExports.jsx(t.ExtraSmallSemiBold,{children:Ri})}),o.jsxRuntimeExports.jsx(u3,{children:o.jsxRuntimeExports.jsx(t.ExtraSmallSemiBold,{children:Oj})}),o.jsxRuntimeExports.jsx(m3,{children:o.jsxRuntimeExports.jsx(t.ExtraSmallSemiBold,{children:Dj})})]}),o.jsxRuntimeExports.jsx(x3,{children:o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:E,width:v})=>o.jsxRuntimeExports.jsx(o.InfiniteLoader,{isItemLoaded:C,itemCount:n?r.length+1:r.length,loadMoreItems:y,children:({onItemsRendered:$})=>o.jsxRuntimeExports.jsx(o.FixedSizeList,{height:E,width:v,itemCount:r.length,itemSize:ye.jobRowHeightPx,itemData:r,onItemsRendered:$,innerElementType:_j,overscanCount:ye.jobSkeletonRowCount,children:jl})})})}),j&&o.jsxRuntimeExports.jsx(C3,{children:Array.from({length:ye.jobSkeletonRowCount},(E,v)=>o.jsxRuntimeExports.jsxs(j3,{children:[o.jsxRuntimeExports.jsx(yn,{$flex:!0,children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:v%2===0?90:70,height:ye.skeletonLoaderHeightPx})}),o.jsxRuntimeExports.jsx(yn,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:60,height:ye.skeletonLoaderHeightPx})}),o.jsxRuntimeExports.jsx(yn,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:t.Space.sp11,height:ye.skeletonLoaderHeightPx})}),o.jsxRuntimeExports.jsx(yn,{children:o.jsxRuntimeExports.jsx(t.ContentLoaderSkeleton,{width:70,height:ye.skeletonLoaderHeightPx})})]},`skeleton-${v}`))})]})]})]})]}),u!=null&&o.jsxRuntimeExports.jsx(er,{operationType:u.operationType,dialogTitle:$t.actions[tr[u.operationType].labelKey],dialogDescription:fl(u.operationType,e.companyName),onCancel:()=>m(null),onConfirm:b})]})},jl=p.memo(({index:e,style:n,data:r})=>{const i=r[e],a=i.operationType.replaceAll("_"," "),c=i.triggeredBy!=null?`${i.triggeredBy.firstName} ${i.triggeredBy.lastName}`.trim():yo.emDash;return o.jsxRuntimeExports.jsxs(h3,{style:n,children:[o.jsxRuntimeExports.jsx(g3,{children:a}),o.jsxRuntimeExports.jsx(S3,{children:i.status}),o.jsxRuntimeExports.jsx(y3,{title:i.createdAt.format(Vo.hmmADashDDMMMCommaYYYY),children:i.createdAt.format(kn.visual.MMMDCommaYYYYformat)}),o.jsxRuntimeExports.jsx(f3,{children:c})]})});jl.displayName="JobListItem";const _j=p.forwardRef(({style:e,...n},r)=>o.jsxRuntimeExports.jsx("div",{ref:r,style:{...e,position:"relative"},...n})),Bj=e=>e>=ye.accuracySuccessThresholdPercent?t.Colors.success:e>=ye.accuracyAlertThresholdPercent?t.Colors.alert:t.Colors.important,Wj=e=>e.split("_").filter(n=>n.length>0).map(n=>n[0].toUpperCase()+n.slice(1).toLowerCase()).join(" "),Vj=s.div`
|
|
3216
3216
|
display: flex;
|
|
3217
3217
|
flex-direction: column;
|
|
3218
3218
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -3390,7 +3390,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3390
3390
|
&:last-child > div {
|
|
3391
3391
|
border-bottom: none;
|
|
3392
3392
|
}
|
|
3393
|
-
`,
|
|
3393
|
+
`,_n=s(t.SmallRegular)`
|
|
3394
3394
|
display: flex;
|
|
3395
3395
|
align-items: center;
|
|
3396
3396
|
padding: ${t.Space.sp1} ${t.Space.sp2};
|
|
@@ -3398,14 +3398,14 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3398
3398
|
overflow: hidden;
|
|
3399
3399
|
border-bottom: 1px solid ${e=>e.theme.colors.grey2};
|
|
3400
3400
|
min-height: ${ye.jobRowHeightPx}px;
|
|
3401
|
-
`,g3=s(
|
|
3401
|
+
`,g3=s(_n)`
|
|
3402
3402
|
flex: 1 1 auto;
|
|
3403
3403
|
min-width: ${ye.jobOperationMinWidthPx}px;
|
|
3404
|
-
`,S3=s(
|
|
3404
|
+
`,S3=s(_n)`
|
|
3405
3405
|
width: ${ye.jobStatusColumnWidthPx}px;
|
|
3406
|
-
`,y3=s(
|
|
3406
|
+
`,y3=s(_n)`
|
|
3407
3407
|
width: ${ye.jobDateColumnWidthPx}px;
|
|
3408
|
-
`,f3=s(
|
|
3408
|
+
`,f3=s(_n)`
|
|
3409
3409
|
width: ${ye.jobByColumnWidthPx}px;
|
|
3410
3410
|
`,C3=s.div`
|
|
3411
3411
|
display: flex;
|
|
@@ -3452,7 +3452,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3452
3452
|
100% {
|
|
3453
3453
|
rotate: 720deg;
|
|
3454
3454
|
}
|
|
3455
|
-
`,{common:{strings:Do,texts:{noCustomersFound:T3}},dateFormat:Ei,timeFormat:vi,aiAccountantCustomer:bl}=t.appLocale.getLocalizedStrings(),I3=({customers:e,sortKey:n,sortOrder:r,selectedTenantIds:i,onAction:a,onCancelOnboarding:c,onColumnSortConfigChanged:l,onRowClick:d,onToggleAllVisible:u,onToggleTenantSelection:m})=>{const[x,f]=p.useState(null),h=nr(),S=p.useMemo(()=>new Set(i),[i]),j=i.length>0,g=p.useMemo(()=>e.map(z=>z.tenantId),[e]),b=p.useMemo(()=>g.filter(z=>S.has(z)).length,[g,S]),C=g.length>0&&b===g.length,y=b>0&&!C,E=z=>{l(z,n===z&&r==="ascending"?"descending":"ascending")},v=p.useCallback((z,
|
|
3455
|
+
`,{common:{strings:Do,texts:{noCustomersFound:T3}},dateFormat:Ei,timeFormat:vi,aiAccountantCustomer:bl}=t.appLocale.getLocalizedStrings(),I3=({customers:e,sortKey:n,sortOrder:r,selectedTenantIds:i,onAction:a,onCancelOnboarding:c,onColumnSortConfigChanged:l,onRowClick:d,onToggleAllVisible:u,onToggleTenantSelection:m})=>{const[x,f]=p.useState(null),h=nr(),S=p.useMemo(()=>new Set(i),[i]),j=i.length>0,g=p.useMemo(()=>e.map(z=>z.tenantId),[e]),b=p.useMemo(()=>g.filter(z=>S.has(z)).length,[g,S]),C=g.length>0&&b===g.length,y=b>0&&!C,E=z=>{l(z,n===z&&r==="ascending"?"descending":"ascending")},v=p.useCallback((z,_)=>{f({customer:z,operationType:_})},[]),$=p.useCallback((z,_,H)=>{x!=null&&a(x.customer,z,_,H),f(null)},[a,x]),I=p.useRef(null),w=p.useMemo(()=>({customerCount:e.length,customers:e,hasWriteAccess:h,isSelectionActive:j,onCancelOnboarding:c,onRequestAction:v,onRowClick:d,onToggleTenantSelection:m,selectedTenantIdSet:S}),[e,h,j,c,v,d,m,S]),T=p.useCallback(({scrollOffset:z})=>{I.current!=null&&(I.current.scrollLeft=z)},[]);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(L3,{children:[o.jsxRuntimeExports.jsxs(A3,{ref:I,children:[h&&o.jsxRuntimeExports.jsx(_3,{children:o.jsxRuntimeExports.jsx(o.Checkbox,{size:"small",checked:C,indeterminate:y,disabled:g.length===0,onChange:()=>u(g)})}),Lj.map(z=>{const _=n===z.key,H=r==="ascending"?"asc":"desc";return o.jsxRuntimeExports.jsx(D3,{$width:z.width,$justifyContent:z.justifyContent,$growToFill:z.growToFill,children:o.jsxRuntimeExports.jsx(O3,{children:z.sortable&&z.key!=="actions"?o.jsxRuntimeExports.jsxs(N3,{type:"button",$active:_,onClick:()=>E(z.key),children:[z.label,o.jsxRuntimeExports.jsx(M3,{$direction:_?H:"asc",children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:ye.sortIconSize,height:ye.sortIconSize})})]}):z.label})},z.key)})]}),e.length===0?o.jsxRuntimeExports.jsx(K3,{children:T3}):o.jsxRuntimeExports.jsx(z3,{children:o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:z,width:_})=>o.jsxRuntimeExports.jsx(o.FixedSizeList,{height:z,width:_,itemCount:e.length,itemSize:ye.rowHeightPx,itemData:w,innerElementType:P3,onScroll:T,overscanCount:5,children:Rl})})})]}),x!=null&&o.jsxRuntimeExports.jsx(er,{operationType:x.operationType,dialogTitle:bl.actions[tr[x.operationType].labelKey],dialogDescription:fl(x.operationType,x.customer.companyName),onCancel:()=>f(null),onConfirm:$})]})},Rl=p.memo(({index:e,style:n,data:r})=>{const{customerCount:i,customers:a,hasWriteAccess:c,isSelectionActive:l,onCancelOnboarding:d,onRequestAction:u,onRowClick:m,onToggleTenantSelection:x,selectedTenantIdSet:f}=r,h=a[e],S=f.has(h.tenantId),j=e===i-1,[g,b]=p.useState(!1),C=p.useRef(null),[y,E]=p.useState({top:0,right:0}),v=h.enrollment?.status??"unknown",$=h.averageAccuracy,I=$>0?`${($*100).toFixed(1)}${Do.percentage}`:Do.emDash;return p.useEffect(()=>{if(g&&C.current!=null){const w=C.current.getBoundingClientRect();E({top:w.bottom,right:window.innerWidth-w.right})}},[g]),p.useEffect(()=>{if(!g)return;const w=()=>b(!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)}},[g]),p.useEffect(()=>{l&&g&&b(!1)},[l,g]),o.jsxRuntimeExports.jsxs(F3,{style:n,$isSelected:S,onClick:()=>m(h),children:[c&&o.jsxRuntimeExports.jsx(B3,{$hideBorder:j,onClick:w=>w.stopPropagation(),children:o.jsxRuntimeExports.jsx(o.Checkbox,{size:"small",checked:S,onChange:()=>x(h.tenantId)})}),o.jsxRuntimeExports.jsx(W3,{$hideBorder:j,children:o.jsxRuntimeExports.jsxs("div",{children:[o.jsxRuntimeExports.jsx(G3,{children:h.companyName.length>0?h.companyName:h.companyId}),o.jsxRuntimeExports.jsx(Y3,{children:h.tenantId})]})}),o.jsxRuntimeExports.jsx(V3,{$hideBorder:j,children:o.jsxRuntimeExports.jsx(Z3,{status:v,children:Cl(v)})}),o.jsxRuntimeExports.jsx(Ss,{$hideBorder:j,children:h.bookcloseDate!=null?h.bookcloseDate.format(Ei.visual.MMMDCommaYYYYformat):Do.emDash}),o.jsxRuntimeExports.jsx(Ss,{$hideBorder:j,title:h.enrollment?.latestTraining!=null?h.enrollment.latestTraining.format(vi.hmmADashDDMMMCommaYYYY):void 0,children:h.enrollment?.latestTraining!=null?h.enrollment.latestTraining.format(Ei.visual.MMMDCommaYYYYformat):Do.emDash}),o.jsxRuntimeExports.jsx(Ss,{$hideBorder:j,title:h.enrollment?.latestTransactionSync!=null?h.enrollment.latestTransactionSync.local().format(vi.hmmADashDDMMMCommaYYYY):void 0,children:h.enrollment?.latestTransactionSync!=null?h.enrollment.latestTransactionSync.utc(!0).fromNow():Do.emDash}),o.jsxRuntimeExports.jsx(U3,{$hideBorder:j,children:I}),o.jsxRuntimeExports.jsx(H3,{$hideBorder:j,children:c&&!l&&o.jsxRuntimeExports.jsxs(X3,{onClick:w=>w.stopPropagation(),children:[o.jsxRuntimeExports.jsx(Q3,{ref:C,onClick:()=>b(!g),children:o.jsxRuntimeExports.jsx(t.SvgMore,{width:ye.menuIconSize,height:ye.menuIconSize})}),g&&Xo.createPortal(o.jsxRuntimeExports.jsx(q3,{style:{top:y.top,right:y.right},children:or(v).map(w=>o.jsxRuntimeExports.jsx(J3,{onClick:()=>{b(!1),w.operationType==="cancel_onboarding"?d(h):u(h,w.operationType)},children:bl.actions[w.labelKey]},w.operationType))}),document.body)]})})]})});Rl.displayName="AiAccountantCustomerListItem";const P3=p.forwardRef(({style:e,...n},r)=>o.jsxRuntimeExports.jsx("div",{ref:r,style:{...e,position:"relative"},...n})),L3=s.div`
|
|
3456
3456
|
position: relative;
|
|
3457
3457
|
flex: 1;
|
|
3458
3458
|
min-height: 0;
|
|
@@ -3537,7 +3537,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3537
3537
|
background: ${e=>e.theme.colors.background};
|
|
3538
3538
|
color: ${e=>e.theme.colors.primary};
|
|
3539
3539
|
}
|
|
3540
|
-
`,
|
|
3540
|
+
`,_3=s.div`
|
|
3541
3541
|
flex: 0 0 auto;
|
|
3542
3542
|
width: ${ye.checkboxColumnWidthPx}px;
|
|
3543
3543
|
min-width: ${ye.checkboxColumnWidthPx}px;
|
|
@@ -3547,7 +3547,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3547
3547
|
justify-content: center;
|
|
3548
3548
|
border-bottom: 1px solid ${e=>e.theme.colors.grey2};
|
|
3549
3549
|
height: ${ye.headerHeightPx}px;
|
|
3550
|
-
`,
|
|
3550
|
+
`,B3=s.div`
|
|
3551
3551
|
flex: 0 0 auto;
|
|
3552
3552
|
width: ${ye.checkboxColumnWidthPx}px;
|
|
3553
3553
|
min-width: ${ye.checkboxColumnWidthPx}px;
|
|
@@ -3662,7 +3662,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3662
3662
|
`,bn=s(t.LargeSemiBold)`
|
|
3663
3663
|
color: ${e=>e.theme.colors.primary};
|
|
3664
3664
|
margin-top: ${t.Space.sp2};
|
|
3665
|
-
`,{common:Mt,aiAccountantCustomer:Ot}=t.appLocale.getLocalizedStrings(),cb="evaluate",db=[{label:Mt.texts.live,value:"active"},{label:Mt.status.pending,value:"pending"},{label:Mt.texts.onboarding,value:"onboarding"},{label:Mt.texts.offboarded,value:"offboarded"},{label:Mt.failed,value:"failed"}],pb=()=>({enrollmentStatus:db}),ub=({headerData:e,headerActions:n,aiAccountantPageActions:r,aiAccountantPageData:i})=>{const a=t.useWindowSizeContext(),c=nr(),{aiAccountantView:l}=i,{onAction:d,onBulkAction:u,onCancelOnboarding:m,onClearSelection:x,onCockpitReloadData:f,onColumnSortConfigChanged:h,onCustomerSelected:S,onEvaluateAll:j,onFilterTextChanged:g,onFiltersChange:b,onToggleAllVisible:C,onToggleTenantSelection:y}=r,E=l.fetchState==="Completed",v=l.fetchState==="In-Progress"||l.fetchState==="Not-Started",$=l.fetchState==="Error",I=l.triggerJobStatus.fetchState==="In-Progress",w=l.selectedTenantIds,T=w.length,z=l.unonboardedTenantIds.length,
|
|
3665
|
+
`,{common:Mt,aiAccountantCustomer:Ot}=t.appLocale.getLocalizedStrings(),cb="evaluate",db=[{label:Mt.texts.live,value:"active"},{label:Mt.status.pending,value:"pending"},{label:Mt.texts.onboarding,value:"onboarding"},{label:Mt.texts.offboarded,value:"offboarded"},{label:Mt.failed,value:"failed"}],pb=()=>({enrollmentStatus:db}),ub=({headerData:e,headerActions:n,aiAccountantPageActions:r,aiAccountantPageData:i})=>{const a=t.useWindowSizeContext(),c=nr(),{aiAccountantView:l}=i,{onAction:d,onBulkAction:u,onCancelOnboarding:m,onClearSelection:x,onCockpitReloadData:f,onColumnSortConfigChanged:h,onCustomerSelected:S,onEvaluateAll:j,onFilterTextChanged:g,onFiltersChange:b,onToggleAllVisible:C,onToggleTenantSelection:y}=r,E=l.fetchState==="Completed",v=l.fetchState==="In-Progress"||l.fetchState==="Not-Started",$=l.fetchState==="Error",I=l.triggerJobStatus.fetchState==="In-Progress",w=l.selectedTenantIds,T=w.length,z=l.unonboardedTenantIds.length,_=T>0,H=p.useMemo(()=>{if(!_)return[];const Y=l.selectedCustomersForJobTrigger.map(F=>or(F.enrollment?.status??"unknown"));if(Y.length===0)return[];const[Z,...Q]=Y;return Z.filter(F=>F.operationType!=="cancel_onboarding"&&Q.every(ue=>ue.some(q=>q.operationType===F.operationType)))},[_,l.selectedCustomersForJobTrigger]),[U,K]=p.useState(!1),W=p.useRef(null),[R,A]=p.useState({top:0,right:0});p.useEffect(()=>{if(U&&W.current!=null){const Y=W.current.getBoundingClientRect();A({top:Y.bottom,right:window.innerWidth-Y.right})}},[U]),p.useEffect(()=>{if(!U)return;const Y=()=>K(!1);return document.addEventListener("click",Y),window.addEventListener("scroll",Y,!0),window.addEventListener("resize",Y),()=>{document.removeEventListener("click",Y),window.removeEventListener("scroll",Y,!0),window.removeEventListener("resize",Y)}},[U]);const[B,P]=p.useState(null),k=()=>{z===0||I||P({mode:"evaluateAll",count:z})},N=Y=>{K(!1),P({mode:"bulk",operationType:Y.operationType,operationLabel:Ot.actions[Y.labelKey],count:T})},V=(Y,Z,Q)=>{B!=null&&(B.mode==="evaluateAll"?j(Z,Q):u(Y,Z,Q),P(null))},ee=_||z===0||I;return o.jsxRuntimeExports.jsxs(mb,{children:[o.jsxRuntimeExports.jsx(jt,{headerActions:{...n,filterActions:{onFilterTextChanged:(Y,Z)=>{g(Z)},getCategoryWiseOptions:pb,onFiltersChange:b}},headerData:{...e,allTabOptions:e.allTabOptions??xt,companiesLoaded:E,filterData:{filterText:l.uiState.filterText,filters:l.uiState.filters},selectedTabOption:"aiAccountant"}}),o.jsxRuntimeExports.jsx(xb,{windowSize:a,children:v?o.jsxRuntimeExports.jsx(tb,{}):$?o.jsxRuntimeExports.jsx(Wt,{onCockpitReloadData:f,selectedCockpitOption:"aiAccountant"}):o.jsxRuntimeExports.jsxs(Eb,{children:[o.jsxRuntimeExports.jsxs(hb,{children:[o.jsxRuntimeExports.jsx(gb,{children:_&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(yb,{children:Ot.bulkActions.selectedCount.replace("__count__",String(T))}),o.jsxRuntimeExports.jsx(fb,{type:"button",onClick:x,children:Mt.clear})]})}),o.jsxRuntimeExports.jsxs(Sb,{children:[o.jsxRuntimeExports.jsx(R3,{isEnabled:!v,spinRefreshIcon:v,onClick:()=>f("aiAccountant")}),c&&!_&&o.jsxRuntimeExports.jsx(t.Button,{label:Mt.texts.evaluateAll,variant:"primary",size:"small",disabled:ee,onClick:k}),c&&_&&o.jsxRuntimeExports.jsxs(Cb,{children:[o.jsxRuntimeExports.jsxs(jb,{ref:W,onClick:Y=>Y.stopPropagation(),children:[o.jsxRuntimeExports.jsx(t.Button,{label:Ot.bulkActions.menuLabel,variant:"primary",size:"small",disabled:H.length===0||I,onClick:()=>K(!U)}),U&&H.length>0&&Xo.createPortal(o.jsxRuntimeExports.jsx(Rb,{style:{top:R.top,right:R.right},children:H.map(Y=>o.jsxRuntimeExports.jsx($b,{onClick:()=>N(Y),children:Ot.actions[Y.labelKey]},Y.operationType))}),document.body)]}),H.length===0&&o.jsxRuntimeExports.jsx(bb,{children:Ot.bulkActions.disabledInfo})]})]})]}),o.jsxRuntimeExports.jsx(ab,{averageAccuracy:l.averageAccuracy,customers:l.customers}),o.jsxRuntimeExports.jsx(I3,{customers:l.customers,sortKey:l.uiState.sortKey,sortOrder:l.uiState.sortOrder,selectedTenantIds:w,onColumnSortConfigChanged:h,onRowClick:S,onAction:d,onCancelOnboarding:m,onToggleAllVisible:C,onToggleTenantSelection:y})]})}),B!=null&&o.jsxRuntimeExports.jsx(er,{operationType:B.mode==="evaluateAll"?cb:B.operationType,dialogTitle:B.mode==="evaluateAll"?Mt.texts.evaluateAll:B.operationLabel,dialogDescription:B.mode==="evaluateAll"?Ot.bulkActions.evaluateAllDialogDescription.replace("__count__",String(B.count)):B.operationType==="offboard"?Ot.bulkActions.bulkDialogDescriptionOffboard.replace("__count__",String(B.count)):Ot.bulkActions.bulkDialogDescription.replace("__count__",String(B.count)).replace("__action__",B.operationLabel),onCancel:()=>P(null),onConfirm:V})]})},mb=s.div`
|
|
3666
3666
|
height: calc(100vh - ${ye.globalNavBarHeightPx}px);
|
|
3667
3667
|
overflow-y: hidden;
|
|
3668
3668
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -3833,7 +3833,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3833
3833
|
width: 100%;
|
|
3834
3834
|
border: 0.2px solid ${e=>e.theme.colors.grey3};
|
|
3835
3835
|
margin-top: auto;
|
|
3836
|
-
`;function zb(e){const{onCancelClick:n,onGoLiveClick:r,showGoLivePopup:i,loading:a}=e,c=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(Ab,{children:[o.jsxRuntimeExports.jsx(Db,{children:Xt.goLiveTitle}),o.jsxRuntimeExports.jsx(Ob,{children:Xt.goLiveDescription}),o.jsxRuntimeExports.jsxs(Nb,{windowSize:c,children:[o.jsxRuntimeExports.jsx(Rn,{children:Xt.goLiveSteps.stepOne}),o.jsxRuntimeExports.jsx(Rn,{children:Xt.goLiveSteps.stepTwo}),o.jsxRuntimeExports.jsx(Rn,{children:Xt.goLiveSteps.stepThree}),o.jsxRuntimeExports.jsx(Rn,{children:Xt.goLiveSteps.stepFour})]}),o.jsxRuntimeExports.jsx(Mb,{}),o.jsxRuntimeExports.jsxs(Fb,{onClick:l=>l.stopPropagation(),children:[o.jsxRuntimeExports.jsx(t.Button,{label:Lb,onClick:n,size:"standard",type:"reset",disabled:a}),o.jsxRuntimeExports.jsx(
|
|
3836
|
+
`;function zb(e){const{onCancelClick:n,onGoLiveClick:r,showGoLivePopup:i,loading:a}=e,c=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(Ab,{children:[o.jsxRuntimeExports.jsx(Db,{children:Xt.goLiveTitle}),o.jsxRuntimeExports.jsx(Ob,{children:Xt.goLiveDescription}),o.jsxRuntimeExports.jsxs(Nb,{windowSize:c,children:[o.jsxRuntimeExports.jsx(Rn,{children:Xt.goLiveSteps.stepOne}),o.jsxRuntimeExports.jsx(Rn,{children:Xt.goLiveSteps.stepTwo}),o.jsxRuntimeExports.jsx(Rn,{children:Xt.goLiveSteps.stepThree}),o.jsxRuntimeExports.jsx(Rn,{children:Xt.goLiveSteps.stepFour})]}),o.jsxRuntimeExports.jsx(Mb,{}),o.jsxRuntimeExports.jsxs(Fb,{onClick:l=>l.stopPropagation(),children:[o.jsxRuntimeExports.jsx(t.Button,{label:Lb,onClick:n,size:"standard",type:"reset",disabled:a}),o.jsxRuntimeExports.jsx(_b,{space:t.Space.sp3}),o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",label:Xt.goLiveText,loading:a,disabled:a,size:"standard",onClick:r})]})]})})}const Fb=s.div`
|
|
3837
3837
|
display: flex;
|
|
3838
3838
|
bottom: 0;
|
|
3839
3839
|
left: 0;
|
|
@@ -3842,9 +3842,9 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3842
3842
|
justify-content: center;
|
|
3843
3843
|
background: ${e=>e.theme.colors.grey5};
|
|
3844
3844
|
padding: 10px ${t.Space.sp3};
|
|
3845
|
-
`,
|
|
3845
|
+
`,_b=s.div`
|
|
3846
3846
|
margin-right: ${e=>e.space};
|
|
3847
|
-
`,$l={maxWidth:new t.ResponsiveSized(280,322),contentMaxWidth:new t.ResponsiveSized(200,250)},
|
|
3847
|
+
`,$l={maxWidth:new t.ResponsiveSized(280,322),contentMaxWidth:new t.ResponsiveSized(200,250)},Bb=$e.keyframes`
|
|
3848
3848
|
0% {
|
|
3849
3849
|
transform: translateX(100%)
|
|
3850
3850
|
}
|
|
@@ -3866,7 +3866,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
3866
3866
|
flex-direction: row;
|
|
3867
3867
|
justify-content: center;
|
|
3868
3868
|
align-items: flex-start;
|
|
3869
|
-
animation: ${
|
|
3869
|
+
animation: ${Bb} 0.4s;
|
|
3870
3870
|
`,Pi=s(t.StandardRegularSp)`
|
|
3871
3871
|
color: ${t.Colors.neutralGrey2Light};
|
|
3872
3872
|
word-break: break-word;
|
|
@@ -4044,7 +4044,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4044
4044
|
margin-left: ${e=>e.setMargin===!0?"20px":t.Space.sp0};
|
|
4045
4045
|
`,Cs=s.div`
|
|
4046
4046
|
height: 18px;
|
|
4047
|
-
`,{common:{strings:E4,texts:{resendInvite:v4,sendInvite:w4}},cockpit:{onboarding:k4}}=t.appLocale.getLocalizedStrings(),T4=["bankAccountLinked","qboLinked","identityVerified","businessVerified"],I4=({companyView:e,companyNameSticky:n,allUsers:r,sendInviteFetchState:i,retryBankAccountConnectionFetchState:a,totalHeight:c,addThreadRequestThreadId:l,targetElementFromNavigation:d,resetTargetElementFromNavigation:u,setNoteData:m,setElementRef:x,setAddThreadRequestThreadId:f,onOnboardingStepClicked:h,onSendInviteClick:S,redirectToDashboardOnboarding:j,onRetryBankAccountConnection:g})=>{const[b,C]=p.useState(null),y=t.useWindowSizeContext(),E=o.useForm({mode:"all"}),{company:{company:{companyInfo:{companyId:v,name:$,primaryEmailDomain:I},companyOnboardingInfo:{onboardingInfo:w}}},tenant:T,onboardingCustomerInfo:z}=e,
|
|
4047
|
+
`,{common:{strings:E4,texts:{resendInvite:v4,sendInvite:w4}},cockpit:{onboarding:k4}}=t.appLocale.getLocalizedStrings(),T4=["bankAccountLinked","qboLinked","identityVerified","businessVerified"],I4=({companyView:e,companyNameSticky:n,allUsers:r,sendInviteFetchState:i,retryBankAccountConnectionFetchState:a,totalHeight:c,addThreadRequestThreadId:l,targetElementFromNavigation:d,resetTargetElementFromNavigation:u,setNoteData:m,setElementRef:x,setAddThreadRequestThreadId:f,onOnboardingStepClicked:h,onSendInviteClick:S,redirectToDashboardOnboarding:j,onRetryBankAccountConnection:g})=>{const[b,C]=p.useState(null),y=t.useWindowSizeContext(),E=o.useForm({mode:"all"}),{company:{company:{companyInfo:{companyId:v,name:$,primaryEmailDomain:I},companyOnboardingInfo:{onboardingInfo:w}}},tenant:T,onboardingCustomerInfo:z}=e,_=P4(e,r),H={companyEmailDomain:I,companyName:$,customerEmail:z.email??z.receiverEmails[0]??""},U=`cockpit_${v}`,K="onboarding.notes",{threads:W,isLoading:R}=t.useFilteredThreads({entityType:K,companyId:v},!1),{openThread:A,threads:B,addThread:P,removeThread:k,setOpenThread:N}=p.useContext(t.ThreadsContext),V=A!==null?B.get(A):null,ee=A?.includes(v)===!0,Y=A!=null&&B.get(A)==null&&ee,Z=l!=null&&B.get(l)?.metadata.companyId===v,Q=p.useCallback(()=>{A?.includes(t.NEW_THREAD_SUFFIX)===!0&&k(A),l!=null&&f(void 0)},[l,A,k,f]),F=M=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:M.isElementThreadOpen??!1,isElementThreadPresent:M.isElementThreadPresent??!1,itemKey:M.itemKey,elementThreadId:M.elementThreadId??E4.empty,roomId:U,addThreadRequestThreadId:l,openThreadId:A,threadStyle:M.threadStyle,openThreadMetadata:V?.metadata??null,onElementClick:q,onAddThreadClick:G,targetElement:d??b}),ue=p.useCallback(M=>{if(M===A)N(null);else if(B.has(M))N(M);else if(M.includes(t.NEW_THREAD_SUFFIX)){const[fe,se]=M.replace(t.NEW_THREAD_SUFFIX,"").split("."),te=co(Bt(fe),J.toOnboardingSortKeyType(se),v,$);P(M,{type:"thread",visibility:"public",id:M,roomId:U,createdAt:new Date,updatedAt:new Date,comments:[],metadata:te,resolved:!1}),N(M)}},[v,$,A,B,P,N,U]),q=p.useCallback((M,fe,se=!1)=>{const te=ro.find(we=>we.key===fe);if(u(),te!=null&&(M.type==="contextmenu"||se===!0)){if(te.isThreadAllowed===!1)return;Q(),M.preventDefault(),M.stopPropagation();const we=t.toCollaborationEntityType({tab:"onboarding",key:te.key});if(M.target instanceof HTMLElement||M.target instanceof SVGElement)if(se===!0&&M.target instanceof HTMLElement)C(M.target.parentElement);else if(M.target instanceof HTMLElement){const Ie=Zs(M.target,ne);C(Ie||M.target)}else{const Ie=M.target.closest(`.${ne}`);Ie instanceof HTMLElement&&C(Ie)}const Se=[...t.getFilteredThreads(B,{entityType:we,companyId:v},"both")],He=Se.length>0&&Se[0].length>0?Se[0][0]:Le("onboarding",te.key,v);B.has(He)?ue(He):l===He?f(void 0):(f(He),N(null))}},[B,v,l,ue,f,N,u,Q]),G=p.useCallback((M,fe)=>{M.stopPropagation();const se=Le("onboarding",fe,v);f(void 0),ue(se)},[v,f,ue]),ie=(M,fe)=>{},ae=p.useCallback(()=>{g(v)},[g,v]);p.useEffect(()=>{const M=E.watch((fe,{name:se})=>{se!=null&&fe.companyData!=null&&o.defer(()=>ie())});return()=>{M.unsubscribe()}});const me=w?.inviteSent,je=w?.accountingConnectionCreationMode,D=p.useCallback(M=>{if(w==null)return!1;switch(M){case"bankAccountLinked":case"qboLinked":case"identityVerified":case"businessVerified":return!0;default:return!1}},[w]),de=p.useCallback(M=>{if(T4.includes(M)&&D(M)){j(I);return}h(v,M)},[j,I,v,h,D]),{useFeatureGate:le}=t.useZeniFeatureContext(),{isFeatureEnabled:xe}=le(t.FeatureGatesNames.isDebitCardFeatureEnabled),L=J.isTenantBankingOnly(xe,T),ge=p.useMemo(()=>{const M=w?.inviteAccepted===!0,fe=w?.groupCreated.completed===!0,se=w?.customerCreated.completed===!0,te=w?.accountingConnectionCreationMode==null,we=w?.accountingConnectionCreationMode==="zeni_user"&&w?.qboLinked.completed!==!0,Se=!L;return M||!fe||!se||te&&Se||we&&Se},[w?.accountingConnectionCreationMode,w?.customerCreated.completed,w?.groupCreated.completed,w?.inviteAccepted,w?.qboLinked.completed,L]),Te=p.useMemo(()=>w?.inviteSent===!0?v4:w4,[w?.inviteSent]);return o.jsxRuntimeExports.jsx(o.FormProvider,{...E,children:o.jsxRuntimeExports.jsx("form",{style:{height:"100%"},children:o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{u(),l!=null&&(f(void 0),l.includes(t.NEW_THREAD_SUFFIX)&&k(l))},children:o.jsxRuntimeExports.jsx(A4,{windowSize:y,isThreadOpen:ee||Z,totalHeight:c,isCreationInProgress:Y,children:ro.map((M,fe)=>{const se=t.toCollaborationEntityType({tab:"onboarding",key:M.key}),te=ro.length-2<=fe,we=[...t.getFilteredThreads(B,{entityType:se,companyId:v},"both")],Se=we.length>0&&we[0].length>0?we[0][0]:Le("onboarding",M.key,v),He=B.get(Se),Ie=He!=null&&He.resolved===!1,X=Se===A,ke=l===Se;switch(M.key){case"companyName":return o.jsxRuntimeExports.jsxs(D4,{companyNameSticky:n,columnWidth:M.width,windowSize:y,isThreadOpen:X||ke,isThreadAllowed:M.isThreadAllowed,className:ne,onContextMenu:Ce=>q(Ce,M.key),ref:Ce=>{x(v,M.key,Ce)},children:[o.jsxRuntimeExports.jsxs(L4,{children:[o.jsxRuntimeExports.jsx(O4,{onClick:Ce=>{Ce.preventDefault()},children:$||I}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{isElementThreadOpen:X,targetElement:d??b,roomId:U,openThreadId:A,openThreadMetadata:V?.metadata??null})]}),o.jsxRuntimeExports.jsxs(N4,{className:"notesIcon",onClick:Ce=>{Ce.preventDefault(),m({roomId:U,companyId:v,companyName:$,entityType:K})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:W.length,isLoading:R}),o.jsxRuntimeExports.jsx(M4,{})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:Ie,itemKey:M.key,style:{left:t.Space.sp4},onElementClick:q}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Le("onboarding",M.key,v),addThreadRequestThreadId:l,itemKey:M.key,onAddThreadClick:G})]},Se);case"groupCreated":case"customerCreated":return o.jsxRuntimeExports.jsxs(So,{ref:Ce=>{x(v,M.key,Ce)},columnWidth:M.width,windowSize:y,isThreadAllowed:M.isThreadAllowed,className:ne,onContextMenu:Ce=>q(Ce,M.key),children:[o.jsxRuntimeExports.jsx(fs,{headerItemData:M,onOnboardingStepClicked:de,onboardingInfo:w,allUsers:r}),F({isElementThreadOpen:X,isElementThreadPresent:Ie,itemKey:M.key,elementThreadId:Se,threadStyle:te?{right:t.Space.sp0}:void 0})]},Se);case"bankAccountLinked":return o.jsxRuntimeExports.jsxs(So,{ref:Ce=>{x(v,M.key,Ce)},columnWidth:M.width,windowSize:y,isThreadAllowed:M.isThreadAllowed,className:ne,onContextMenu:Ce=>q(Ce,M.key),children:[o.jsxRuntimeExports.jsx(fs,{headerItemData:M,onOnboardingStepClicked:de,onboardingInfo:w,allUsers:r,isDisabled:me!==!0,onRetry:ae,retryButtonLoading:a==="In-Progress",headerKey:M.key}),F({isElementThreadOpen:X,isElementThreadPresent:Ie,itemKey:M.key,elementThreadId:Se,threadStyle:te?{right:t.Space.sp0}:void 0})]},Se);case"qboLinked":return o.jsxRuntimeExports.jsxs(So,{ref:Ce=>{x(v,M.key,Ce)},columnWidth:M.width,windowSize:y,isThreadAllowed:M.isThreadAllowed,className:ne,onContextMenu:Ce=>q(Ce,M.key),children:[o.jsxRuntimeExports.jsx(fs,{headerItemData:M,onOnboardingStepClicked:de,onboardingInfo:w,allUsers:r,isDisabled:je==="customer"&&me!==!0||L}),F({isElementThreadOpen:X,isElementThreadPresent:Ie,itemKey:M.key,elementThreadId:Se,threadStyle:te?{right:t.Space.sp0}:void 0})]},Se);case"identityVerified":case"businessVerified":return o.jsxRuntimeExports.jsxs(So,{ref:Ce=>{x(v,M.key,Ce)},columnWidth:M.width,windowSize:y,isThreadAllowed:M.isThreadAllowed,className:ne,onContextMenu:Ce=>q(Ce,M.key),children:[o.jsxRuntimeExports.jsx(u4,{headerItemData:M,onOnboardingStepClicked:de,onboardingInfo:w,allUsers:r,isDisabled:me!==!0}),F({isElementThreadOpen:X,isElementThreadPresent:Ie,itemKey:M.key,elementThreadId:Se,threadStyle:te?{right:t.Space.sp0}:void 0})]},Se);case"enroller":return o.jsxRuntimeExports.jsxs(So,{ref:Ce=>{x(v,M.key,Ce)},columnWidth:M.width,windowSize:y,isThreadAllowed:M.isThreadAllowed,className:ne,onContextMenu:Ce=>q(Ce,M.key),children:[o.jsxRuntimeExports.jsx(t.UserMultiSelectField,{name:"companyData.controller",value:_.controller,placeholderLabel:k4.onboardingUsersPlaceholder,isReadOnly:!0,pickerStyles:{titleTextStyle:t.textStyles.largeRegular,multiValueLabelTitleStyle:t.textStyles.largeRegular}}),F({isElementThreadOpen:X,isElementThreadPresent:Ie,itemKey:M.key,elementThreadId:Se,threadStyle:te?{right:t.Space.sp0}:void 0})]},Se);case"invite":return o.jsxRuntimeExports.jsxs(So,{ref:Ce=>{x(v,M.key,Ce)},columnWidth:M.width,windowSize:y,isThreadAllowed:M.isThreadAllowed,className:ne,onContextMenu:Ce=>q(Ce,M.key),children:[o.jsxRuntimeExports.jsx(t.Button,{disabled:ge,variant:"primary",label:Te,onClick:()=>S(v,w?.inviteSent??!1,H),size:"small",loading:i==="In-Progress"}),F({isElementThreadOpen:X,isElementThreadPresent:Ie,itemKey:M.key,elementThreadId:Se,threadStyle:te?{right:t.Space.sp0}:void 0})]},Se);default:return null}})})})})})};function P4(e,n){const r=e.company.company.companyOnboardingInfo.onboardingUserIds,i=n.filter(c=>r.findIndex(l=>l===c.userId)>-1),a=[];return r.forEach(c=>{const l=i.filter(d=>d.userId===c)[0];l!=null&&a.push(l)}),{controller:{allUsers:n,selectedUsers:a}}}const L4=s.div``,A4=s.div`
|
|
4048
4048
|
display: flex;
|
|
4049
4049
|
flex-direction: row;
|
|
4050
4050
|
align-items: center;
|
|
@@ -4144,7 +4144,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4144
4144
|
z-index: auto;
|
|
4145
4145
|
cursor: ${e=>e.isThreadAllowed?"pointer":"initial"};
|
|
4146
4146
|
position: relative;
|
|
4147
|
-
`,{cockpit:{onboarding:z4},collaboration:{threads:{placeholder:{addANewComment:F4,replyAComment:
|
|
4147
|
+
`,{cockpit:{onboarding:z4},collaboration:{threads:{placeholder:{addANewComment:F4,replyAComment:_4},tooltip:{resolveComment:B4,unResolveComment:W4}}},common:{texts:{comments:V4}}}=t.appLocale.getLocalizedStrings(),U4={onboardingRightPadding:new t.ResponsiveSized(t.sp[3],t.sp[8])},H4=({onboardingView:e,qboConnectionPoolFlag:n,onSendInviteClick:r,onOnboardingStepClicked:i,onCancelClicked:a,onGoLiveClicked:c,onScroll:l,onUpdateCustomerCreationStatus:d,onColumnSortConfigChanged:u,redirectToDashboardOnboarding:m,onRetryBankAccountConnection:x,onQBOConnectClick:f,initialOpenThreadRequest:h})=>{const S=t.useWindowSizeContext(),j=p.useRef(null),[g,b]=p.useState(null),{setOpenThread:C,setRequestToOpenThread:y,requestToOpenThread:E,isLoading:v}=p.useContext(t.ThreadsContext);p.useEffect(()=>{h!=null&&e.fetchState==="Completed"&&v===!1&&y(h)},[h,e.fetchState,v,y]);const[$,I]=p.useState(void 0),w=p.useRef(null),T=p.useRef([]),[z,_]=p.useState(null),H=!(S==="small"||S==="medium-compact"),{uiState:U}=e,K=z4.onboardingCompleted.replace("_company-name_",U.selectedCustomerName),[W,R]=p.useState("Not-Started"),[A,B]=p.useState("Not-Started"),{saveFetchState:P,customerCreationStatus:k}=e;p.useEffect(()=>{P.fetchState==="Completed"&&k.stage!=="none"?(B("Not-Started"),R(P.fetchState)):R("Not-Started")},[P.fetchState,k]),p.useEffect(()=>{e.updateStatus.fetchState==="Completed"?(R("Not-Started"),B(e.updateStatus.fetchState)):B("Not-Started")},[e.updateStatus.fetchState]);const N=0,V=p.useCallback(()=>{const F=e.onboardingCustomers.filter(ue=>ue.company.company.companyInfo.companyId===U.selectedCompanyId);if(F.length>0){const{company:ue,onboardingCustomerInfo:q,tenant:G}=F[0],ie={companyEmailDomain:q.companyEmailDomain,companyId:ue.company.companyInfo.companyId,isOnboardingCompleted:!0,isOnboardingTenant:!0,tenantId:G.tenantId,userEmailWithPreOnboardSuccess:q.userEmailWithPreOnboardSuccess};c(ie)}},[c,e.onboardingCustomers,U.selectedCompanyId]),ee=p.useCallback(F=>e.onboardingCustomers[F].company.company.companyInfo.name.length>lo?De+32:De,[e.onboardingCustomers]);p.useEffect(()=>{j.current&&j.current.resetAfterIndex(0)},[e]);const Y=p.useMemo(()=>({makeCompanyNameSticky:H,uiState:U,onColumnSortConfigChanged:u}),[H,U,u]),Z=p.useCallback((F,ue,q)=>{const G=e.onboardingCustomers.findIndex(ae=>ae.company.company.companyInfo.companyId===F),ie=ro.findIndex(ae=>ae.key===ue);G!==-1&&ie!==-1&&(T.current[G]==null?T.current[G]=[q]:T.current[G][ie]=q)},[e.onboardingCustomers]),Q=p.useCallback(()=>{w.current=null,y(null)},[y]);return p.useEffect(()=>{if(E!=null&&g!=null){const{companyId:F,entityType:ue}=E,[q,G]=ue.split("."),ie=e.onboardingCustomers.findIndex(D=>D.company.company.companyInfo.companyId===F),ae=ro.findIndex(D=>D.key===G);ie!==-1&&!(g.visibleStartIndex<=ie&&g.visibleStopIndex>=ie)&&j.current?.scrollToItem(ie,"center"),setTimeout(()=>{const D=T.current[ie]?.[0]?.getBoundingClientRect().bottom,de=T.current[ie]?.[0]?.getBoundingClientRect().top;if(D!=null&&de!=null&&(window.innerHeight>=D&&window.innerHeight>=de||de<0)){const le=T.current[ie][ae];le!=null&&(w.current={companyId:F,target:le}),T.current[ie][ae]?.scrollIntoView({block:"center",behavior:"auto"})}},0);const je=setInterval(()=>{const D=T.current[ie]?.[ae]?.getBoundingClientRect().left,de=T.current[ie]?.[ae]?.getBoundingClientRect().right,le=T.current[ie]?.[ae]?.offsetWidth;if(w.current?.companyId===F&&D!=null&&le!=null&&de!=null&&(D<window.innerWidth-le||de<window.innerWidth)){clearInterval(je);const xe=E.threadId,L=E.onThreadShownCallback;xe&&(y(null),C(E.threadId),L?.())}},500);setTimeout(()=>{clearInterval(je),y(null)},2e3)}},[E,g,C,y]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[n?o.jsxRuntimeExports.jsx(vb,{qboConnectionPool:e.qboConnectionPool,isLoading:e.qboConnectionPool.saveQBOConnectionPoolState.fetchState==="In-Progress",onQBOConnectClick:f}):null,o.jsxRuntimeExports.jsxs(G4,{children:[U.showGoLivePopUp===!0?o.jsxRuntimeExports.jsx(zb,{hasAdminRole:!0,onCancelClick:()=>{a()},onGoLiveClick:V,showGoLivePopup:U.showGoLivePopUp,loading:e.updateStatus.fetchState==="In-Progress"}):null,W==="Completed"?o.jsxRuntimeExports.jsx(Ai,{customerCreationType:k,fetchState:W,onRemoveSnackbar:()=>{d(),R("Not-Started")}}):null,A==="Completed"?o.jsxRuntimeExports.jsx(Ai,{fetchState:A,customMessageText:K,onRemoveSnackbar:()=>{B("Not-Started")}}):null,o.jsxRuntimeExports.jsxs(El.Provider,{value:Y,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:F,width:ue})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:F,width:ue,itemCount:e.onboardingCustomers.length,itemSize:ee,onItemsRendered:q=>b(q),overscanCount:ao,itemData:{onboardingView:e,makeCompanyNameSticky:H,addThreadRequestThreadId:$,targetElement:w.current?.target,resetTargetElementFromNavigation:Q,setElementRef:Z,setAddThreadRequestThreadId:I,setNoteData:_,onOnboardingStepClicked:i,onSendInviteClick:r,redirectToDashboardOnboarding:m,onRetryBankAccountConnection:x},ref:j,innerElementType:vl,onScroll:({scrollOffset:q})=>{l(q)},initialScrollOffset:N,style:{willChange:"auto"},children:K4})}),z!=null?o.jsxRuntimeExports.jsx(ot.RoomProvider,{id:z.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${z.companyName} ${V4}`,filter:{application:"cockpit",companyId:z.companyId,entityType:z.entityType,isGlobalComment:!1,tab:"onboarding"},isLoading:!1,threadMetadata:{companyName:z.companyName,companyId:z.companyId,entityId:z.companyId,entityType:z.entityType,isGlobalComment:!1,application:"cockpit",tab:"onboarding",url:window.location.href},textOverrides:{composerPlaceholder:F4,replyComposerPlaceholder:_4,threadResolve:B4,threadUnResolve:W4},onThreadClick:F=>null,onCloseAllThreadsDrawer:()=>_(null)})}):null]})]})]})},El=p.createContext(void 0),vl=p.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:c,uiState:l,onColumnSortConfigChanged:d}=p.useContext(El);return o.jsxRuntimeExports.jsxs(X4,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(t4,{companyNameSticky:c,onColumnSortConfigChanged:d,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder}}),o.jsxRuntimeExports.jsx(Z4,{children:r})]})});vl.displayName="Onboarding list view inner element type";const K4=({index:e,style:n,data:r})=>{const i=t.useWindowSizeContext(),{onboardingView:a,makeCompanyNameSticky:c,addThreadRequestThreadId:l,targetElement:d,resetTargetElementFromNavigation:u,setElementRef:m,setNoteData:x,setAddThreadRequestThreadId:f,onOnboardingStepClicked:h,onSendInviteClick:S,redirectToDashboardOnboarding:j,onRetryBankAccountConnection:g}=r,b=a.onboardingCustomers[e],{companyId:C}=b.company.company.companyInfo;return o.jsxRuntimeExports.jsx(Y4,{isCollapsed:!0,style:{...n,width:"fit-content",minWidth:"100%",padding:`${t.Space.sp0} ${U4.onboardingRightPadding.valuePx(i)} ${t.Space.sp3} ${t.Space.sp0}`},children:o.jsxRuntimeExports.jsx(I4,{totalHeight:typeof n.height=="number"?n.height:De,companyView:a.onboardingCustomers[e],companyNameSticky:c,allUsers:a.zeniUsers.values,sendInviteFetchState:a.sendInviteFetchStateByCompanyId[a.onboardingCustomers[e].company.company.companyInfo.companyId]?.fetchState,addThreadRequestThreadId:l,targetElementFromNavigation:d,resetTargetElementFromNavigation:u,setNoteData:x,setElementRef:m,setAddThreadRequestThreadId:f,retryBankAccountConnectionFetchState:a.retryBankAccountConnectionFetchStateByCompanyId[a.onboardingCustomers[e].company.company.companyInfo.companyId]?.fetchState,onOnboardingStepClicked:h,onSendInviteClick:S,redirectToDashboardOnboarding:j,onRetryBankAccountConnection:g})},C)},G4=s.div`
|
|
4148
4148
|
/** Subtract top so list can occupy remaining available height */
|
|
4149
4149
|
height: calc(100vh - 108px);
|
|
4150
4150
|
max-width: 99.9%;
|
|
@@ -4175,7 +4175,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4175
4175
|
height: calc(100vh - 45px);
|
|
4176
4176
|
overflow-y: hidden;
|
|
4177
4177
|
background-color: ${e=>e.theme.colors.grey4};
|
|
4178
|
-
`,sR=({headerData:e,headerActions:n,initialOpenThreadRequest:r,onboardingPageActions:i,onboardingPageData:a})=>{const[c,l]=p.useState(!1),[d,u]=p.useState(void 0),[m,x]=p.useState(void 0),{analytics:f}=t.useToolkitContext(),{onboardingView:h,qboConnectionPoolFlag:S}=a,{onScroll:j,onOnboardingStepClicked:g,onCancelClicked:b,onGoLiveClicked:C,onUpdateCustomerCreationStatus:y,onCockpitReloadData:E,onSendInviteClick:v,onColumnSortConfigChanged:$,redirectToDashboardOnboarding:I,onRetryBankAccountConnection:w,onQBOConnectClick:T}=i,z=h.fetchState==="Completed"&&h.zeniUsers.fetchState==="Completed",
|
|
4178
|
+
`,sR=({headerData:e,headerActions:n,initialOpenThreadRequest:r,onboardingPageActions:i,onboardingPageData:a})=>{const[c,l]=p.useState(!1),[d,u]=p.useState(void 0),[m,x]=p.useState(void 0),{analytics:f}=t.useToolkitContext(),{onboardingView:h,qboConnectionPoolFlag:S}=a,{onScroll:j,onOnboardingStepClicked:g,onCancelClicked:b,onGoLiveClicked:C,onUpdateCustomerCreationStatus:y,onCockpitReloadData:E,onSendInviteClick:v,onColumnSortConfigChanged:$,redirectToDashboardOnboarding:I,onRetryBankAccountConnection:w,onQBOConnectClick:T}=i,z=h.fetchState==="Completed"&&h.zeniUsers.fetchState==="Completed",_={onOkClick:()=>{l(!1),d!=null&&(v(d),m!=null&&f.trackOnboardingSendInvite(d,!1,m))},onCancelClick:()=>{l(!1)}};return o.jsxRuntimeExports.jsxs(nR,{children:[c===!0?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{style:{paddingLeft:t.Space.sp6,paddingRight:t.Space.sp6},children:Fi.confirmationPopup.title}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Fi.confirmationPopup.subTitle}),primaryButtonText:J4,secondaryButtonText:q4,action:_,style:{background:t.Colors.overlayDark}}):null,o.jsxRuntimeExports.jsx(jt,{headerActions:{...n},headerData:{...e,allTabOptions:e.allTabOptions??xt,companiesLoaded:z,filterData:{filterText:h.uiState.filterText,disableFilters:!0},selectedTabOption:"onboarding"}}),o.jsxRuntimeExports.jsx(rR,{initialOpenThreadRequest:r,onColumnSortConfigChanged:$,onCockpitReloadData:E,onGoLiveClicked:C,onQBOConnectClick:T,onRetryBankAccountConnection:w,onScroll:j,onSendInviteClick:(H,U,K)=>{U?(v(H),f.trackOnboardingSendInvite(H,!0,K)):(u(H),x(K),l(!0))},onboardingView:h,onOnboardingStepClicked:g,onCancelClicked:b,onUpdateCustomerCreationStatus:y,qboConnectionPoolFlag:S,redirectToDashboardOnboarding:I})]})},rR=({onboardingView:e,qboConnectionPoolFlag:n,initialOpenThreadRequest:r,onSendInviteClick:i,onScroll:a,onOnboardingStepClicked:c,onCancelClicked:l,onGoLiveClicked:d,onUpdateCustomerCreationStatus:u,onCockpitReloadData:m,onColumnSortConfigChanged:x,redirectToDashboardOnboarding:f,onRetryBankAccountConnection:h,onQBOConnectClick:S})=>{const j=t.useWindowSizeContext();return e.fetchState==="Error"?o.jsxRuntimeExports.jsx(Wt,{onCockpitReloadData:m,selectedCockpitOption:"onboarding"}):e.fetchState==="In-Progress"||e.fetchState==="Not-Started"?o.jsxRuntimeExports.jsx(tR,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})}):e.onboardingCustomers.length===0?o.jsxRuntimeExports.jsx(t.EmptySearchResults,{emptySearchTextFirstLine:eR,emptySearchTextSecondLine:Q4}):o.jsxRuntimeExports.jsx(oR,{windowSize:j,children:o.jsxRuntimeExports.jsx(H4,{initialOpenThreadRequest:r,onCancelClicked:l,onColumnSortConfigChanged:x,onGoLiveClicked:d,onQBOConnectClick:S,onRetryBankAccountConnection:h,onScroll:a,onSendInviteClick:i,onUpdateCustomerCreationStatus:u,onboardingView:e,qboConnectionPoolFlag:n,redirectToDashboardOnboarding:f,onOnboardingStepClicked:c})})},{common:{add:iR},cockpit:{onboarding:{customer:{companyCredentials:aR,companyDomain:lR,domain:cR}}}}=t.appLocale.getLocalizedStrings(),dR=({localData:e,labelWidth:n,onCompanyDomainBlurred:r,isOnboardingAllowedForUser:i})=>{const{isCustomerCreated:a,isEmailGroupCreated:c,companyEmailDomain:l,companyId:d}=e.newOnboardingCustomerLocalData,u=a===!0||c===!0||d!=null||i===!1,m=l!=null&&xR(l);return o.jsxRuntimeExports.jsxs(pR,{children:[o.jsxRuntimeExports.jsx(mR,{children:aR}),o.jsxRuntimeExports.jsx(uR,{children:o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:lR,width:n},text:{type:"text",name:"companySection.companyDomain",placeholder:`${iR} ${cR}`,options:{required:!0,pattern:t.DOMAIN_PATTERN}},onBlur:()=>{m&&r(l)},isDisabled:u===!0?"readonly":void 0})})]})},pR=s.div`
|
|
4179
4179
|
display: flex;
|
|
4180
4180
|
flex-direction: column;
|
|
4181
4181
|
gap: ${t.Space.sp2};
|
|
@@ -4308,7 +4308,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4308
4308
|
height: ${t.Space.sp6};
|
|
4309
4309
|
align-items: center;
|
|
4310
4310
|
padding: ${t.Space.sp0} ${t.Space.sp4};
|
|
4311
|
-
`,{cockpit:{onboarding:We},common:ve}=t.appLocale.getLocalizedStrings(),{strings:{colon:Et,empty:
|
|
4311
|
+
`,{cockpit:{onboarding:We},common:ve}=t.appLocale.getLocalizedStrings(),{strings:{colon:Et,empty:_i},placeholder:TR,labels:IR}=ve,PR=`${ve.add} ${ve.texts.firstName.toLowerCase()}`,LR=`${ve.add} ${ve.texts.lastName.toLowerCase()}`,AR=`${ve.add} ${We.customer.customerName.toLowerCase()}`,kl=p.forwardRef(({sectionId:e,localData:n,onboardedCompanies:r,isSubsidiary:i,labelWidth:a,realmIdAdditionalLabel:c,productsAdditionalLabel:l,isDisabled:d,largeLabelWidth:u},m)=>{const{emailGroupFetchState:x,newOnboardingCustomerLocalData:f,companyView:h,allProductsList:S}=n,j=o.useTheme(),[g,b]=p.useState(Mn(S,f.selectedProducts??[]));p.useEffect(()=>{f.selectedProducts!=null&&b(Mn(S,f.selectedProducts))},[f.selectedProducts]);const C=x.fetchState!=="Completed"&&f.isEmailGroupCreated==null,y=d!=null||C?"disabled":d,E=n.companyView?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed===!0;let v;const $=r.find(I=>I.companyInfo.companyId===f.parentCompanyId);return $!=null&&(v={label:$.companyInfo.name,value:$.companyInfo.companyId}),o.jsxRuntimeExports.jsxs(DR,{isDisabled:C,ref:m,children:[o.jsxRuntimeExports.jsxs(OR,{children:[o.jsxRuntimeExports.jsx(MR,{children:ve.texts.customerCreation}),f.companyId!=null&&o.jsxRuntimeExports.jsx(wl,{isCompleted:h?.company.companyOnboardingInfo.onboardingInfo?.customerCreated.completed===!0})]}),o.jsxRuntimeExports.jsxs(NR,{children:[o.jsxRuntimeExports.jsx(t.LabeledNameField,{label:{label:`${We.customer.customerName}${Et}`,width:a},nameField:{name:`${e}.customerName`,registerOptions:{required:!0},defaultValue:{firstName:n.newOnboardingCustomerLocalData.customerName?.firstName??_i,lastName:n.newOnboardingCustomerLocalData.customerName?.lastName??_i},placeHolder:{firstName:PR,lastName:LR,name:AR},showFullNameError:!0},isDisabled:y==="disabled"?"disabled":d,showAdditionalInfoLabel:!0,additionalInfoLabel:We.customer.customerNameInfoText,style:{width:"auto"}}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${We.customer.customerEmail}${Et}`,width:a},text:{type:"email",name:`${e}.email`,placeholder:`${ve.add} ${We.customer.customerEmail.toLowerCase()}`,autoComplete:"off",options:{required:!0}},isDisabled:y==="disabled"?"disabled":d,showAdditionalInfoLabel:!0,additionalInfoLabel:We.customer.customerEmailInfoText}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${ve.texts.companyName}${Et}`,width:a},text:{type:"text",name:`${e}.name`,placeholder:`${ve.add} ${ve.texts.companyName.toLowerCase()}`,options:{required:!0}},isDisabled:y,showAdditionalInfoLabel:!0,additionalInfoLabel:We.customer.companyNameInfoText}),i===!0?o.jsxRuntimeExports.jsx(vR,{label:{label:`${We.customer.entity}${Et}`,width:a},concatText:ve.of,firstSingleSelectField:{name:`${e}.entityType`,placeholder:`${ve.add} ${We.customer.entity.toLowerCase()}`,defaultValue:{selectedOption:{value:ve.texts.subsidiary,label:ve.texts.subsidiary},allOptions:[{value:ve.texts.parent,label:ve.texts.parent},{value:ve.texts.subsidiary,label:ve.texts.subsidiary}]},style:{backgroundColor:j.colors.background}},secondSingleSelectField:{name:`${e}.company`,placeholder:`${ve.add} ${ve.texts.parent.toLowerCase()}`,defaultValue:{selectedOption:v,allOptions:r.map(I=>({label:I.companyInfo.name,value:I.companyInfo.companyId}))},style:{backgroundColor:j.colors.background},registerOptions:{required:i}},isDisabled:y}):o.jsxRuntimeExports.jsx(t.LabeledSingleSelectWithoutClearableField,{label:{label:`${We.customer.entity}${Et}`,width:a},singleSelectWithoutClearableField:{name:`${e}.entityType`,placeholder:`${ve.add} ${We.customer.entity.toLowerCase()}`,defaultValue:{selectedOption:{value:ve.texts.parent,label:ve.texts.parent},allOptions:[{value:ve.texts.parent,label:ve.texts.parent},{value:ve.texts.subsidiary,label:ve.texts.subsidiary}]}},isDisabled:y}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${ve.texts.realmId}${Et}`,width:a},text:{type:"text",name:`${e}.realmId`,placeholder:`${ve.add} ${We.customer.realmIdText}`,options:{pattern:t.REALM_ID}},showTooltip:!0,tooltipTitle:o.jsxRuntimeExports.jsx(zR,{}),isDisabled:y==="disabled"||E===!0?"disabled":d,isOptional:!0}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${We.customer.confirmRealmId}${Et}`,width:u},text:{type:"text",name:`${e}.confirmRealmId`,placeholder:`${We.customer.confirmRealmIdText}`,options:{pattern:t.REALM_ID,validate:(I,w)=>I===w[e].realmId}},additionalInfoLabel:c,disableCopyPaste:!0,isDisabled:y==="disabled"||E===!0?"disabled":d,isOptional:!0}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${ve.texts.hubspotId}${Et}`,width:a},text:{type:"text",name:"customerSection.hubSpotId",placeholder:`${ve.add} ${ve.texts.hubspotId}`,options:{pattern:t.DIGITS_PATTERN}},isDisabled:y,isOptional:!0}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${We.customer.chargebeeId}${Et}`,width:a},text:{type:"text",name:"customerSection.chargebeeId",placeholder:`${ve.add} ${We.customer.chargebeeIdText}`,options:{pattern:t.ALPHA_NUMERIC_PATTERN,required:!0}},isDisabled:y}),o.jsxRuntimeExports.jsx(gR,{label:{label:IR.products,width:a},additionalInfoLabel:l||void 0,multiSelectWithCheckBoxField:{name:"customerSection.products",defaultValue:{allOptions:g,selectedOptions:f.selectedProducts??[]},placeholder:TR.productsPlaceholder,isDisabled:y,registerOptions:{validate:I=>I!=null&&I.selectedOptions.length>0}},style:{width:"auto"}})]})]})});kl.displayName="CustomerCreation";const DR=s.div`
|
|
4312
4312
|
opacity: ${e=>e.isDisabled?.4:1};
|
|
4313
4313
|
display: flex;
|
|
4314
4314
|
flex-direction: column;
|
|
@@ -4324,7 +4324,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4324
4324
|
border-radius: ${t.Space.sp2};
|
|
4325
4325
|
`,MR=s(t.LargeSemiBold)`
|
|
4326
4326
|
color: ${e=>e.theme.colors.champion};
|
|
4327
|
-
`,zR=()=>o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(
|
|
4327
|
+
`,zR=()=>o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Bi,{children:We.customer.reamlIdTooltip.firstLine}),o.jsxRuntimeExports.jsx(Bi,{children:We.customer.reamlIdTooltip.secondLine})]}),Bi=s.div``,Mn=(e,n)=>{const r=n.includes("bookkeeping"),i=n.includes("zeni_checking"),a=n.includes("zeni_cards"),c=n.includes("zeni_treasury"),l=n.includes("zeni_payroll"),d=n.includes("zeni_cfo"),u=n.includes("zeni_tax"),m=l||d||u,x=["zeni_payroll","zeni_cfo","zeni_tax"],f=["zeni_bill_pay","zeni_reimbursements"],h=["zeni_checking","zeni_cards","zeni_treasury"],S=["zeni_bill_pay","zeni_reimbursements"];return e.map(j=>{const{code:g,name:b}=j,C={label:b,value:g,isDisabled:!1,isFiltered:!1};if(h.includes(g))return C.isDisabled=!0,C.isFiltered=!0,C;if(f.includes(g))return C.isDisabled=!0,C.isFiltered=!1,C;if(m){const y=x.includes(g);return C.isFiltered=!1,C.isDisabled=!y,C}if(r)return g==="bookkeeping"?(C.isDisabled=!1,C.isFiltered=!1):(S.includes(g),C.isDisabled=!0,C.isFiltered=!1),C;if(i||a||c){const E=["bookkeeping","zeni_checking","zeni_cards","zeni_treasury"].includes(g);return C.isFiltered=!E,C.isDisabled=!E,C}return C})},FR=e=>{switch(e){case"ExtraSmall":return t.sp[2];case"Small":return t.sp[3];case"Standard":return t.sp[4];case"Large":return t.sp[5];case"ExtraLarge":return t.sp[7]}},_R=s.div`
|
|
4328
4328
|
color: ${e=>e.theme.colors.primary};
|
|
4329
4329
|
display: flex;
|
|
4330
4330
|
justify-content: center;
|
|
@@ -4334,7 +4334,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4334
4334
|
border-radius: 50%;
|
|
4335
4335
|
align-items: center;
|
|
4336
4336
|
box-shadow: ${t.Space.sp0} 2px 2px 2px ${t.Colors.boxShadowElevation};
|
|
4337
|
-
`;function
|
|
4337
|
+
`;function BR({size:e,disableShrink:n,reverseSpinnerColor:r,style:i}){const a=o.useTheme(),c=FR(e),l=r?a.colors.grey5:a.colors.primary;return o.jsxRuntimeExports.jsx(_R,{style:{color:l,...i},children:o.jsxRuntimeExports.jsx(o.CircularProgress,{disableShrink:n,size:c,color:"inherit"})})}function WR({size:e,start:n,disableShrink:r,reverseSpinnerColor:i,style:a}){return n?o.jsxRuntimeExports.jsx(BR,{disableShrink:r===!0,size:e,reverseSpinnerColor:i===!0,style:a}):null}const{common:Qt,cockpit:{onboarding:js}}=t.appLocale.getLocalizedStrings(),Tl=p.forwardRef(({sectionId:e,localData:n,labelWidth:r,groupNameAdditionalLabel:i,groupEmailAdditionalLabel:a,isDisabled:c},l)=>{const{emailGroupFetchState:d,newOnboardingCustomerLocalData:u,companyView:m}=n,x=d.fetchState!=="Completed"&&u.isEmailGroupCreated==null,f=x||u.isEmailGroupCreated===!0||c!=null?"readonly":c;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[d.fetchState==="In-Progress"?o.jsxRuntimeExports.jsx(GR,{children:o.jsxRuntimeExports.jsx(WR,{size:"Large",start:!0})}):null,o.jsxRuntimeExports.jsxs(VR,{isDisabled:x,ref:l,children:[o.jsxRuntimeExports.jsxs(HR,{children:[o.jsxRuntimeExports.jsx(UR,{children:Qt.texts.groupCreation}),u.companyId!=null&&o.jsxRuntimeExports.jsx(wl,{isCompleted:m?.company.companyOnboardingInfo.onboardingInfo?.groupCreated.completed===!0})]}),o.jsxRuntimeExports.jsxs(KR,{children:[o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${Qt.texts.groupName}:`,width:r},text:{type:"text",name:`${e}.groupName`,placeholder:`${Qt.add} ${Qt.texts.groupName.toLowerCase()}`,options:{required:u.groupId!=""&&u.groupId!=null}},additionalInfoLabel:i,isDisabled:f}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${js.customer.groupEmail}:`,width:r},text:{type:"email",name:`${e}.groupEmail`,placeholder:`${Qt.add} ${js.customer.groupEmail.toLowerCase()}`,options:{required:u.groupName!=""&&u.groupName!=null}},additionalInfoLabel:a,isDisabled:f}),o.jsxRuntimeExports.jsx(t.LabeledTextField,{label:{label:`${js.customer.groupDescription}:`,width:r},text:{type:"text",name:`${e}.groupDescription`,placeholder:`${Qt.add} ${Qt.texts.description.toLowerCase()}`},isDisabled:f})]})]})]})});Tl.displayName="GroupCreation";const VR=s.div`
|
|
4338
4338
|
opacity: ${e=>e.isDisabled?.4:1};
|
|
4339
4339
|
display: flex;
|
|
4340
4340
|
flex-direction: column;
|
|
@@ -4430,7 +4430,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4430
4430
|
color: ${t.Colors.importantDark};
|
|
4431
4431
|
padding: ${t.Space.sp2} ${t.Space.sp2};
|
|
4432
4432
|
border-radius: ${t.Space.sp1};
|
|
4433
|
-
`,{common:Ae,cockpit:{onboarding:Ge}}=t.appLocale.getLocalizedStrings(),m$=Ae.no,x$=Ae.yes,pe=Ae.strings,Wi="onboardingCustomerPage",h$="companySection",St="groupSection",Ne="customerSection",Il="qboConnectionSection",Fo={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)};function g$({localData:e,screenType:n,qboConnectClicked:r,analytics:i,onOnboardingCustomerDataUpdated:a,onCloseClick:c,onSaveClick:l,onViewClick:d,onCompanyDomainBlurred:u,onNavigateToPreOnboarding:m,onQBOConnectClick:x}){const f=o.useTheme(),h=t.useWindowSizeContext(),S=Fo.labelWidth.value(h),j=Fo.largeLabelWidth.value(h),g=Fo.extraLargeLabelWidth.value(h),b=o.useForm({mode:"all",reValidateMode:"onChange",defaultValues:p.useMemo(()=>Bo(e),[e])}),{emailGroupFetchState:C,newOnboardingCustomerLocalData:y,onboardingCompletedCompanies:E,isOnboardingAllowedForUser:v,fetchState:$,sendInviteFetchState:I,uiState:w,companyView:T,externalConnections:z}=e,[B,H]=p.useState(pe.empty),[U,K]=p.useState(pe.empty),[W]=p.useState(pe.empty),[R,A]=p.useState(pe.empty),[_,P]=p.useState(pe.empty),[k,N]=p.useState(!1),[V,ee]=p.useState(!1),[Y,Z]=p.useState(Ge.customer.completePreOnboardingText),[Q,F]=p.useState(!1),ue=p.useRef(null),q=p.useRef(null),G=p.useRef(null),{isExistingCustomer:ie,isCustomerOnboardedSuccessfully:ae}=j$(e),me=ie&&ae?Ge.customer.customerNameExistInManagementText:Ge.customer.customerNameExistInOnboardingText,je=p.useMemo(()=>me.replace("_company-domain_",y.companyEmailDomain??pe.empty),[C.fetchState]),D=T?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed,de=p.useCallback(()=>{const O=b.getValues();return O[Ne].realmId!==O[Ne].confirmRealmId?(A(Ge.customer.realmIdWarning),b.trigger(`${Ne}.confirmRealmId`),!1):(A(pe.empty),b.clearErrors(`${Ne}.confirmRealmId`),!0)},[b]),le=p.useCallback(()=>{const O=b.getValues();return O[Ne].entityType.selectedOption?.value=="Subsidiary"&&O[Ne].company.selectedOption==null?(b.setError("customerSection.company",{type:"required"}),!1):(b.clearErrors("customerSection.company"),!0)},[b]),xe=p.useCallback(()=>y.customerName?.firstName&&!y.customerName?.lastName||!y.customerName?.firstName&&y.customerName?.lastName?(b.trigger(`${Ne}.customerName`),!1):(y.customerName?.firstName||y.customerName?.lastName)&&!y.email?(b.trigger(`${Ne}.email`),!1):(y.customerName?.firstName||y.customerName?.lastName)&&y.email&&y.selectedProducts?.length===0?(P(Ge.customer.productsWarning),b.trigger(`${Ne}.products`),!1):!0,[b,y.customerName,y.email,y.selectedProducts]),L=p.useCallback(()=>de()&&le()&&xe(),[le,de,xe]),ge=b.handleSubmit(()=>{Z(Ge.customer.completePreOnboardingText),L()&&ee(!0)},()=>{L(),console.warn("Onboarding customer form error")}),Te=b.getValues()[Ne].email??pe.empty,M=(O=!1)=>{const he={companyDomain:y.companyEmailDomain??pe.empty,primaryContactEmail:Te},Re={groupName:y.groupName??pe.empty,groupEmail:y.groupId??pe.empty,groupDescription:y.groupDescription??pe.empty},Oe={firstName:y.customerName?.firstName??pe.empty,lastName:y.customerName?.lastName??pe.empty,customerEmail:Te,companyName:y.name??pe.empty,entittyType:y.isSubsidiary===!0?Ae.texts.subsidiary:Ae.texts.parent??pe.empty,chargebeeId:y.chargebeeId??pe.empty,products:y.selectedProducts??[],qboRealmId:y.qboRealmId??pe.empty,hubSpotId:y.hubSpotId},Ee={isSendInvite:O,isInviteAlreadySent:T?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0,isZeniManagedQboConnectionSelected:y.accountingConnectionCreationMode==="zeni_user",isCustomerManagedQboConnectionSelected:y.accountingConnectionCreationMode==="customer",qboConnectionStatus:T?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed??!1};i?.trackOnboardingSaveOrSendInvite(he,Re,Oe,Ee)},fe=()=>{const O={companyEmailDomain:y.companyEmailDomain??pe.empty,primaryContactEmail:Te},he={groupName:y.groupName??pe.empty,groupEmail:y.groupId??pe.empty,groupDescription:y.groupDescription??pe.empty,isCompanyEmailDomainAvailable:!0};i?.trackOnboardingNewCustomerGroupCreationCheck(O,he)},se=()=>{let O=!0;const he=b.getValues();if(he[St].groupEmail!==pe.empty&&he[St].groupName===pe.empty)H(Ge.customer.groupNameWarning),b.setError("groupSection.groupName",{type:"required"}),O=!1;else if(he[St].groupName!==pe.empty&&he[St].groupEmail===pe.empty)K(Ge.customer.groupEmailWarning),b.setError("groupSection.groupEmail",{type:"required"}),O=!1;else{const{error:Re}=b.getFieldState("groupSection.groupName"),{error:Oe}=b.getFieldState("groupSection.groupEmail");(Re==null||Re.type==="required")&&(Oe==null||Oe.type==="required")&&(O=!1,b.clearErrors("groupSection")),H(pe.empty),K(pe.empty)}return O},te={onOkClick:()=>{N(!1),b.reset(),c()},onCancelClick:()=>{N(!1)}},we={onOkClick:()=>{ee(!1),l(!0),M(!0)},onCancelClick:()=>{ee(!1)}},Se=async(O,he)=>{const Re={...he};if(O.includes("groupName")&&he[St].groupName!=pe.empty&&(he[St].groupName=he[St].groupName.charAt(0).toUpperCase()+he[St].groupName.slice(1)),(O.includes("groupName")||O.includes("groupEmail"))&&se(),O.includes("confirmRealmId")&&A(pe.empty),O.includes("products")&&o.isEqual(y.selectedProducts??[],he[Ne].products.selectedOptions)===!1){P(pe.empty);const Oe=b$(y.selectedProducts??[],he[Ne].products.selectedOptions.map(Xe=>J.toProductTypeStrict(Xe)).filter(Xe=>Xe!=null));Re[Ne].products.selectedOptions=Oe;const Ee=Mn(e.allProductsList,Oe);b.setValue(`${Ne}.products`,{allOptions:Ee,selectedOptions:Oe})}O.includes("realmId")&&o.has(b.formState.errors,`${Ne}.confirmRealmId`)&&b.trigger(`${Ne}.confirmRealmId`),a(Re)},He=O=>{const{dirtyFields:he}=b.formState;he.companySection?.companyDomain===!0&&u(O)},Ie=()=>{Object.keys(b.formState.errors).length===0&&(m?.(),Z(pe.empty))},X=()=>{C.fetchState==="Error"?u(y.companyEmailDomain):L()&&Object.keys(b.formState.errors).length===0&&(l(I.fetchState==="Error"),M())},ke=()=>{L()&&Object.keys(b.formState.errors).length===0&&(l(!1),M())};p.useEffect(()=>{const O=b.watch((he,{name:Re})=>{Re!=null&&he!=null&&o.defer(()=>Se(Re,he))});return()=>{O.unsubscribe()}}),p.useEffect(()=>{y.isCustomerCreationDisabled===!0&&(b.resetField("customerSection",{defaultValue:Bo(e)[Ne],keepDirty:!0}),b.clearErrors("customerSection"))},[y.isCustomerCreationDisabled]),p.useEffect(()=>{F(y.isSubsidiary===!0),y.isSubsidiary!==!0&&b.resetField("customerSection.company",{defaultValue:Bo(e)[Ne].company,keepDirty:!0}),b.resetField("customerSection.entityType",{defaultValue:Bo(e)[Ne].entityType,keepDirty:!0})},[y.isSubsidiary]),p.useEffect(()=>{C.fetchState==="Completed"&&(b.reset(Bo(e)),ie||fe())},[C.fetchState]),p.useEffect(()=>{w.selectedStep==="STEP_1"?ue.current?.scrollIntoView():w.selectedStep==="STEP_2"?q.current?.scrollIntoView():w.selectedStep==="STEP_3"&&G.current?.scrollIntoView()},[]),p.useEffect(()=>{const O=T?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed;if(z?.saveConnectionState==="Error"){const Re={firstName:y.customerName?.firstName??pe.empty,lastName:y.customerName?.lastName??pe.empty,customerEmail:b.getValues()[Ne].email??pe.empty,qboConnectionResponseMessage:Ae.texts.unableToConnectQuickbooksPleaseTryAgain,isSuccess:!1};i?.trackOnboardingZeniManagedQBOConnection(Re)}else if(O??!1){const Re={firstName:y.customerName?.firstName??pe.empty,lastName:y.customerName?.lastName??pe.empty,customerEmail:b.getValues()[Ne].email??pe.empty,qboConnectionResponseMessage:Ae.texts.congratulationsYouHaveSuccessfullyEstablishedAConnectionWith,isSuccess:!0};i?.trackOnboardingZeniManagedQBOConnection(Re)}},[z?.saveConnectionState,T?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed]),p.useEffect(()=>{if(y.accountingConnectionCreationMode){const O=T?.company.companyOnboardingInfo.onboardingInfo?.accountingConnectionCreationMode??pe.empty;if(y.accountingConnectionCreationMode!==O){const he={firstName:y.customerName?.firstName??pe.empty,lastName:y.customerName?.lastName??pe.empty,customerEmail:b.getValues()[Ne].email??pe.empty,isZeniOrCustomer:y.accountingConnectionCreationMode??pe.empty};i?.trackOnboardingQBOConnectionSelected(he)}}},[y.accountingConnectionCreationMode]);const Ce=(O,he)=>{const{fetchState:Re}=O,{isEmailGroupCreated:Oe,selectedProducts:Ee}=he,Xe=Re!=="Completed"&&Oe==null,be=Ee==null||Ee.length===0,Qe=(Ee?.includes("zeni_checking")===!0||Ee?.includes("zeni_treasury")===!0||Ee?.includes("zeni_cards")===!0||Ee?.includes("zeni_payroll")===!0||Ee?.includes("zeni_cfo")===!0||Ee?.includes("zeni_tax")===!0)&&Ee?.includes("bookkeeping")===!1;return Xe||be||Qe},uo=p.useMemo(()=>{const O=b.formState.isValid,he=y.selectedProducts!=null&&(y.selectedProducts.includes("zeni_payroll")===!0||y.selectedProducts.includes("zeni_cfo")===!0||y.selectedProducts.includes("zeni_tax")===!0),Re=y.selectedProducts!=null&&(y.selectedProducts.includes("zeni_checking")===!0||y.selectedProducts.includes("zeni_cards")===!0||he)&&y.selectedProducts.includes("bookkeeping")===!1;return O!==!0||C.fetchState==="In-Progress"||C.fetchState==="Error"||$==="In-Progress"||$==="Error"||v!==!0||y.selectedProducts==null||y.selectedProducts.length===0||y.accountingConnectionCreationMode==null&&!Re||y.accountingConnectionCreationMode==="zeni_user"&&D!==!0&&!Re||C.fetchState==="Completed"&&ie||T?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted===!0},[C.fetchState,ie,v,$,b.formState.isValid,y.accountingConnectionCreationMode,D,y.selectedProducts,T?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted]),Ve=p.useMemo(()=>I.fetchState!=="In-Progress"&&I.fetchState!=="Error"&&$!=="In-Progress"&&$!=="Error"&&C.fetchState!=="In-Progress"&&ie===!0,[C.fetchState,ie,$,I.fetchState]);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[k===!0?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:Ae.confirmationPopup.discardTitle}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Ae.confirmationPopup.discardDescription}),primaryButtonText:Ae.confirmationPopup.discard,secondaryButtonText:Ae.cancel,proceedButtonVariant:"destructive",action:te,style:{background:t.Colors.overlayDark}}):null,V===!0?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{style:{paddingLeft:t.Space.sp6,paddingRight:t.Space.sp6},children:Ge.confirmationPopup.title}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Ge.confirmationPopup.subTitle}),primaryButtonText:x$,secondaryButtonText:m$,action:we,style:{background:t.Colors.overlayDark}}):null,o.jsxRuntimeExports.jsx(t.NavBarWithClose,{title:n==="create"?Ae.texts.newCustomer:Ae.texts.editCustomer,backgroundColor:f.colors.grey5,style:{zIndex:4},onCloseClick:()=>{Object.keys(b.formState.dirtyFields).length>0?N(!0):(b.reset(),c())}}),o.jsxRuntimeExports.jsxs(S$,{children:[o.jsxRuntimeExports.jsx(y$,{children:Ge.customer.subTitle}),o.jsxRuntimeExports.jsx(o.FormProvider,{...b,children:o.jsxRuntimeExports.jsxs("form",{id:`${Wi}_form`,onSubmit:ge,children:[o.jsxRuntimeExports.jsx(dR,{localData:e,labelWidth:S,onCompanyDomainBlurred:He,primaryEmailDomainAdditionalLabel:W,isOnboardingAllowedForUser:v}),Ve===!0?o.jsxRuntimeExports.jsxs(Rs,{children:[o.jsxRuntimeExports.jsxs($s,{children:[o.jsxRuntimeExports.jsxs(Vi,{children:[o.jsxRuntimeExports.jsx(bs,{}),o.jsxRuntimeExports.jsx(t.StandardMedium,{children:Ge.customer.groupCreationError})]}),o.jsxRuntimeExports.jsx(C$,{children:je})]}),o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:f.colors.champion,borderColor:f.colors.champion,color:f.mode==="light"?t.darkColors.primary:t.lightColors.primary,height:"30px",width:t.Space.sp7},label:Ae.view,size:"small",onClick:()=>{d(ae?"management":"onboarding")}})]}):null,C.fetchState==="Error"||$==="Error"||I.fetchState==="Error"&&e.error!=null&&e.error?.code!==406?o.jsxRuntimeExports.jsxs(Rs,{children:[o.jsxRuntimeExports.jsx($s,{children:o.jsxRuntimeExports.jsxs(Vi,{children:[o.jsxRuntimeExports.jsx(bs,{}),o.jsxRuntimeExports.jsx(t.LargeMedium,{children:Ge.customer.emailgroupAPIError})]})}),o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:f.colors.champion,borderColor:f.colors.champion,color:f.mode==="light"?t.darkColors.primary:t.lightColors.primary},label:Ge.customer.tryAgainText,size:"small",onClick:X})]}):null,I.fetchState==="Error"&&e.error!=null&&e.error?.code===406?o.jsxRuntimeExports.jsxs(Rs,{children:[o.jsxRuntimeExports.jsx(bs,{}),o.jsxRuntimeExports.jsxs($s,{children:[o.jsxRuntimeExports.jsx(t.LargeMedium,{children:Y!==pe.empty?Ge.customer.preOnboardingError:Ge.customer.preOnboardingSaveError}),Y!==pe.empty?o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:f.colors.champion,borderColor:f.colors.champion,color:f.mode==="light"?t.darkColors.primary:t.lightColors.primary},label:Y,size:"small",onClick:Ie}):null]})]}):null,o.jsxRuntimeExports.jsx(Tl,{groupEmailAdditionalLabel:U,groupNameAdditionalLabel:B,labelWidth:S,localData:e,ref:ue,sectionId:St}),o.jsxRuntimeExports.jsx(kl,{localData:e,onboardedCompanies:E.companies,isSubsidiary:Q,labelWidth:S,largeLabelWidth:j,extraLargeLabelWidth:g,realmIdAdditionalLabel:R,productsAdditionalLabel:_,ref:q,sectionId:Ne,isDisabled:v===!1?"disabled":void 0}),o.jsxRuntimeExports.jsx(f$,{children:o.jsxRuntimeExports.jsx(JR,{isSectionDisabled:Ce(C,y),sectionId:Il,isLoading:r===!0||z?.fetchState==="In-Progress"||z?.saveConnectionState==="In-Progress",accountingConnectionCreationMode:e.newOnboardingCustomerLocalData.accountingConnectionCreationMode,onQBOConnectClick:x,isConnected:T?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed===!0,isInviteSent:T?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0||T?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted===!0,saveConnectionState:z?.saveConnectionState})})]})})]}),o.jsxRuntimeExports.jsx(t.Footer,{formId:`${Wi}_form`,primaryBtn:{label:T?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0?Ae.texts.resendInvite:Ae.texts.sendInvite,style:{width:Fo.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isLoading:I.fetchState==="In-Progress",isDisabled:uo},cancelBtn:{label:Ae.save,style:{width:Fo.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isDisabled:!(t.formHasDirtyFields(b.formState.dirtyFields)||e.emailGroupFetchState.fetchState==="Completed"),isLoading:$==="In-Progress"&&r===!1,shouldResetOnCancel:!1,onClick:ke,reverseSpinnerColor:!1}})]})}const Bo=e=>{const{newOnboardingCustomerLocalData:n,onboardingCompletedCompanies:r}=e;let i;const a=r.companies.find(c=>c.companyInfo.companyId===n.parentCompanyId);return a!=null&&(i={label:a.companyInfo.name,value:a.companyInfo.companyId}),{[h$]:{companyDomain:n.companyEmailDomain??pe.empty},[St]:{groupName:n.groupName??pe.empty,groupEmail:n.groupId??pe.empty,groupDescription:n.groupDescription??pe.empty},[Ne]:{name:n.name??pe.empty,entityType:{allOptions:[{label:Ae.texts.parent,value:Ae.texts.parent},{label:Ae.texts.subsidiary,value:Ae.texts.subsidiary}],selectedOption:n.isSubsidiary===!0?{label:Ae.texts.subsidiary,value:Ae.texts.subsidiary}:{label:Ae.texts.parent,value:Ae.texts.parent}},company:{selectedOption:i,allOptions:r.companies.map(c=>({label:c.companyInfo.name,value:c.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:Mn(e.allProductsList,n.selectedProducts??[]),selectedOptions:n.selectedProducts??[]}},[Il]:{accountingConnectionCreationMode:n.accountingConnectionCreationMode}}},S$=s.div`
|
|
4433
|
+
`,{common:Ae,cockpit:{onboarding:Ge}}=t.appLocale.getLocalizedStrings(),m$=Ae.no,x$=Ae.yes,pe=Ae.strings,Wi="onboardingCustomerPage",h$="companySection",St="groupSection",Ne="customerSection",Il="qboConnectionSection",Fo={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)};function g$({localData:e,screenType:n,qboConnectClicked:r,analytics:i,onOnboardingCustomerDataUpdated:a,onCloseClick:c,onSaveClick:l,onViewClick:d,onCompanyDomainBlurred:u,onNavigateToPreOnboarding:m,onQBOConnectClick:x}){const f=o.useTheme(),h=t.useWindowSizeContext(),S=Fo.labelWidth.value(h),j=Fo.largeLabelWidth.value(h),g=Fo.extraLargeLabelWidth.value(h),b=o.useForm({mode:"all",reValidateMode:"onChange",defaultValues:p.useMemo(()=>_o(e),[e])}),{emailGroupFetchState:C,newOnboardingCustomerLocalData:y,onboardingCompletedCompanies:E,isOnboardingAllowedForUser:v,fetchState:$,sendInviteFetchState:I,uiState:w,companyView:T,externalConnections:z}=e,[_,H]=p.useState(pe.empty),[U,K]=p.useState(pe.empty),[W]=p.useState(pe.empty),[R,A]=p.useState(pe.empty),[B,P]=p.useState(pe.empty),[k,N]=p.useState(!1),[V,ee]=p.useState(!1),[Y,Z]=p.useState(Ge.customer.completePreOnboardingText),[Q,F]=p.useState(!1),ue=p.useRef(null),q=p.useRef(null),G=p.useRef(null),{isExistingCustomer:ie,isCustomerOnboardedSuccessfully:ae}=j$(e),me=ie&&ae?Ge.customer.customerNameExistInManagementText:Ge.customer.customerNameExistInOnboardingText,je=p.useMemo(()=>me.replace("_company-domain_",y.companyEmailDomain??pe.empty),[C.fetchState]),D=T?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed,de=p.useCallback(()=>{const O=b.getValues();return O[Ne].realmId!==O[Ne].confirmRealmId?(A(Ge.customer.realmIdWarning),b.trigger(`${Ne}.confirmRealmId`),!1):(A(pe.empty),b.clearErrors(`${Ne}.confirmRealmId`),!0)},[b]),le=p.useCallback(()=>{const O=b.getValues();return O[Ne].entityType.selectedOption?.value=="Subsidiary"&&O[Ne].company.selectedOption==null?(b.setError("customerSection.company",{type:"required"}),!1):(b.clearErrors("customerSection.company"),!0)},[b]),xe=p.useCallback(()=>y.customerName?.firstName&&!y.customerName?.lastName||!y.customerName?.firstName&&y.customerName?.lastName?(b.trigger(`${Ne}.customerName`),!1):(y.customerName?.firstName||y.customerName?.lastName)&&!y.email?(b.trigger(`${Ne}.email`),!1):(y.customerName?.firstName||y.customerName?.lastName)&&y.email&&y.selectedProducts?.length===0?(P(Ge.customer.productsWarning),b.trigger(`${Ne}.products`),!1):!0,[b,y.customerName,y.email,y.selectedProducts]),L=p.useCallback(()=>de()&&le()&&xe(),[le,de,xe]),ge=b.handleSubmit(()=>{Z(Ge.customer.completePreOnboardingText),L()&&ee(!0)},()=>{L(),console.warn("Onboarding customer form error")}),Te=b.getValues()[Ne].email??pe.empty,M=(O=!1)=>{const he={companyDomain:y.companyEmailDomain??pe.empty,primaryContactEmail:Te},Re={groupName:y.groupName??pe.empty,groupEmail:y.groupId??pe.empty,groupDescription:y.groupDescription??pe.empty},Oe={firstName:y.customerName?.firstName??pe.empty,lastName:y.customerName?.lastName??pe.empty,customerEmail:Te,companyName:y.name??pe.empty,entittyType:y.isSubsidiary===!0?Ae.texts.subsidiary:Ae.texts.parent??pe.empty,chargebeeId:y.chargebeeId??pe.empty,products:y.selectedProducts??[],qboRealmId:y.qboRealmId??pe.empty,hubSpotId:y.hubSpotId},Ee={isSendInvite:O,isInviteAlreadySent:T?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0,isZeniManagedQboConnectionSelected:y.accountingConnectionCreationMode==="zeni_user",isCustomerManagedQboConnectionSelected:y.accountingConnectionCreationMode==="customer",qboConnectionStatus:T?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed??!1};i?.trackOnboardingSaveOrSendInvite(he,Re,Oe,Ee)},fe=()=>{const O={companyEmailDomain:y.companyEmailDomain??pe.empty,primaryContactEmail:Te},he={groupName:y.groupName??pe.empty,groupEmail:y.groupId??pe.empty,groupDescription:y.groupDescription??pe.empty,isCompanyEmailDomainAvailable:!0};i?.trackOnboardingNewCustomerGroupCreationCheck(O,he)},se=()=>{let O=!0;const he=b.getValues();if(he[St].groupEmail!==pe.empty&&he[St].groupName===pe.empty)H(Ge.customer.groupNameWarning),b.setError("groupSection.groupName",{type:"required"}),O=!1;else if(he[St].groupName!==pe.empty&&he[St].groupEmail===pe.empty)K(Ge.customer.groupEmailWarning),b.setError("groupSection.groupEmail",{type:"required"}),O=!1;else{const{error:Re}=b.getFieldState("groupSection.groupName"),{error:Oe}=b.getFieldState("groupSection.groupEmail");(Re==null||Re.type==="required")&&(Oe==null||Oe.type==="required")&&(O=!1,b.clearErrors("groupSection")),H(pe.empty),K(pe.empty)}return O},te={onOkClick:()=>{N(!1),b.reset(),c()},onCancelClick:()=>{N(!1)}},we={onOkClick:()=>{ee(!1),l(!0),M(!0)},onCancelClick:()=>{ee(!1)}},Se=async(O,he)=>{const Re={...he};if(O.includes("groupName")&&he[St].groupName!=pe.empty&&(he[St].groupName=he[St].groupName.charAt(0).toUpperCase()+he[St].groupName.slice(1)),(O.includes("groupName")||O.includes("groupEmail"))&&se(),O.includes("confirmRealmId")&&A(pe.empty),O.includes("products")&&o.isEqual(y.selectedProducts??[],he[Ne].products.selectedOptions)===!1){P(pe.empty);const Oe=b$(y.selectedProducts??[],he[Ne].products.selectedOptions.map(Xe=>J.toProductTypeStrict(Xe)).filter(Xe=>Xe!=null));Re[Ne].products.selectedOptions=Oe;const Ee=Mn(e.allProductsList,Oe);b.setValue(`${Ne}.products`,{allOptions:Ee,selectedOptions:Oe})}O.includes("realmId")&&o.has(b.formState.errors,`${Ne}.confirmRealmId`)&&b.trigger(`${Ne}.confirmRealmId`),a(Re)},He=O=>{const{dirtyFields:he}=b.formState;he.companySection?.companyDomain===!0&&u(O)},Ie=()=>{Object.keys(b.formState.errors).length===0&&(m?.(),Z(pe.empty))},X=()=>{C.fetchState==="Error"?u(y.companyEmailDomain):L()&&Object.keys(b.formState.errors).length===0&&(l(I.fetchState==="Error"),M())},ke=()=>{L()&&Object.keys(b.formState.errors).length===0&&(l(!1),M())};p.useEffect(()=>{const O=b.watch((he,{name:Re})=>{Re!=null&&he!=null&&o.defer(()=>Se(Re,he))});return()=>{O.unsubscribe()}}),p.useEffect(()=>{y.isCustomerCreationDisabled===!0&&(b.resetField("customerSection",{defaultValue:_o(e)[Ne],keepDirty:!0}),b.clearErrors("customerSection"))},[y.isCustomerCreationDisabled]),p.useEffect(()=>{F(y.isSubsidiary===!0),y.isSubsidiary!==!0&&b.resetField("customerSection.company",{defaultValue:_o(e)[Ne].company,keepDirty:!0}),b.resetField("customerSection.entityType",{defaultValue:_o(e)[Ne].entityType,keepDirty:!0})},[y.isSubsidiary]),p.useEffect(()=>{C.fetchState==="Completed"&&(b.reset(_o(e)),ie||fe())},[C.fetchState]),p.useEffect(()=>{w.selectedStep==="STEP_1"?ue.current?.scrollIntoView():w.selectedStep==="STEP_2"?q.current?.scrollIntoView():w.selectedStep==="STEP_3"&&G.current?.scrollIntoView()},[]),p.useEffect(()=>{const O=T?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed;if(z?.saveConnectionState==="Error"){const Re={firstName:y.customerName?.firstName??pe.empty,lastName:y.customerName?.lastName??pe.empty,customerEmail:b.getValues()[Ne].email??pe.empty,qboConnectionResponseMessage:Ae.texts.unableToConnectQuickbooksPleaseTryAgain,isSuccess:!1};i?.trackOnboardingZeniManagedQBOConnection(Re)}else if(O??!1){const Re={firstName:y.customerName?.firstName??pe.empty,lastName:y.customerName?.lastName??pe.empty,customerEmail:b.getValues()[Ne].email??pe.empty,qboConnectionResponseMessage:Ae.texts.congratulationsYouHaveSuccessfullyEstablishedAConnectionWith,isSuccess:!0};i?.trackOnboardingZeniManagedQBOConnection(Re)}},[z?.saveConnectionState,T?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed]),p.useEffect(()=>{if(y.accountingConnectionCreationMode){const O=T?.company.companyOnboardingInfo.onboardingInfo?.accountingConnectionCreationMode??pe.empty;if(y.accountingConnectionCreationMode!==O){const he={firstName:y.customerName?.firstName??pe.empty,lastName:y.customerName?.lastName??pe.empty,customerEmail:b.getValues()[Ne].email??pe.empty,isZeniOrCustomer:y.accountingConnectionCreationMode??pe.empty};i?.trackOnboardingQBOConnectionSelected(he)}}},[y.accountingConnectionCreationMode]);const Ce=(O,he)=>{const{fetchState:Re}=O,{isEmailGroupCreated:Oe,selectedProducts:Ee}=he,Xe=Re!=="Completed"&&Oe==null,be=Ee==null||Ee.length===0,Qe=(Ee?.includes("zeni_checking")===!0||Ee?.includes("zeni_treasury")===!0||Ee?.includes("zeni_cards")===!0||Ee?.includes("zeni_payroll")===!0||Ee?.includes("zeni_cfo")===!0||Ee?.includes("zeni_tax")===!0)&&Ee?.includes("bookkeeping")===!1;return Xe||be||Qe},uo=p.useMemo(()=>{const O=b.formState.isValid,he=y.selectedProducts!=null&&(y.selectedProducts.includes("zeni_payroll")===!0||y.selectedProducts.includes("zeni_cfo")===!0||y.selectedProducts.includes("zeni_tax")===!0),Re=y.selectedProducts!=null&&(y.selectedProducts.includes("zeni_checking")===!0||y.selectedProducts.includes("zeni_cards")===!0||he)&&y.selectedProducts.includes("bookkeeping")===!1;return O!==!0||C.fetchState==="In-Progress"||C.fetchState==="Error"||$==="In-Progress"||$==="Error"||v!==!0||y.selectedProducts==null||y.selectedProducts.length===0||y.accountingConnectionCreationMode==null&&!Re||y.accountingConnectionCreationMode==="zeni_user"&&D!==!0&&!Re||C.fetchState==="Completed"&&ie||T?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted===!0},[C.fetchState,ie,v,$,b.formState.isValid,y.accountingConnectionCreationMode,D,y.selectedProducts,T?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted]),Ve=p.useMemo(()=>I.fetchState!=="In-Progress"&&I.fetchState!=="Error"&&$!=="In-Progress"&&$!=="Error"&&C.fetchState!=="In-Progress"&&ie===!0,[C.fetchState,ie,$,I.fetchState]);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[k===!0?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:Ae.confirmationPopup.discardTitle}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Ae.confirmationPopup.discardDescription}),primaryButtonText:Ae.confirmationPopup.discard,secondaryButtonText:Ae.cancel,proceedButtonVariant:"destructive",action:te,style:{background:t.Colors.overlayDark}}):null,V===!0?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{style:{paddingLeft:t.Space.sp6,paddingRight:t.Space.sp6},children:Ge.confirmationPopup.title}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:Ge.confirmationPopup.subTitle}),primaryButtonText:x$,secondaryButtonText:m$,action:we,style:{background:t.Colors.overlayDark}}):null,o.jsxRuntimeExports.jsx(t.NavBarWithClose,{title:n==="create"?Ae.texts.newCustomer:Ae.texts.editCustomer,backgroundColor:f.colors.grey5,style:{zIndex:4},onCloseClick:()=>{Object.keys(b.formState.dirtyFields).length>0?N(!0):(b.reset(),c())}}),o.jsxRuntimeExports.jsxs(S$,{children:[o.jsxRuntimeExports.jsx(y$,{children:Ge.customer.subTitle}),o.jsxRuntimeExports.jsx(o.FormProvider,{...b,children:o.jsxRuntimeExports.jsxs("form",{id:`${Wi}_form`,onSubmit:ge,children:[o.jsxRuntimeExports.jsx(dR,{localData:e,labelWidth:S,onCompanyDomainBlurred:He,primaryEmailDomainAdditionalLabel:W,isOnboardingAllowedForUser:v}),Ve===!0?o.jsxRuntimeExports.jsxs(Rs,{children:[o.jsxRuntimeExports.jsxs($s,{children:[o.jsxRuntimeExports.jsxs(Vi,{children:[o.jsxRuntimeExports.jsx(bs,{}),o.jsxRuntimeExports.jsx(t.StandardMedium,{children:Ge.customer.groupCreationError})]}),o.jsxRuntimeExports.jsx(C$,{children:je})]}),o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:f.colors.champion,borderColor:f.colors.champion,color:f.mode==="light"?t.darkColors.primary:t.lightColors.primary,height:"30px",width:t.Space.sp7},label:Ae.view,size:"small",onClick:()=>{d(ae?"management":"onboarding")}})]}):null,C.fetchState==="Error"||$==="Error"||I.fetchState==="Error"&&e.error!=null&&e.error?.code!==406?o.jsxRuntimeExports.jsxs(Rs,{children:[o.jsxRuntimeExports.jsx($s,{children:o.jsxRuntimeExports.jsxs(Vi,{children:[o.jsxRuntimeExports.jsx(bs,{}),o.jsxRuntimeExports.jsx(t.LargeMedium,{children:Ge.customer.emailgroupAPIError})]})}),o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:f.colors.champion,borderColor:f.colors.champion,color:f.mode==="light"?t.darkColors.primary:t.lightColors.primary},label:Ge.customer.tryAgainText,size:"small",onClick:X})]}):null,I.fetchState==="Error"&&e.error!=null&&e.error?.code===406?o.jsxRuntimeExports.jsxs(Rs,{children:[o.jsxRuntimeExports.jsx(bs,{}),o.jsxRuntimeExports.jsxs($s,{children:[o.jsxRuntimeExports.jsx(t.LargeMedium,{children:Y!==pe.empty?Ge.customer.preOnboardingError:Ge.customer.preOnboardingSaveError}),Y!==pe.empty?o.jsxRuntimeExports.jsx(t.Button,{style:{padding:`${t.Space.sp1} ${t.Space.sp2}`,backgroundColor:f.colors.champion,borderColor:f.colors.champion,color:f.mode==="light"?t.darkColors.primary:t.lightColors.primary},label:Y,size:"small",onClick:Ie}):null]})]}):null,o.jsxRuntimeExports.jsx(Tl,{groupEmailAdditionalLabel:U,groupNameAdditionalLabel:_,labelWidth:S,localData:e,ref:ue,sectionId:St}),o.jsxRuntimeExports.jsx(kl,{localData:e,onboardedCompanies:E.companies,isSubsidiary:Q,labelWidth:S,largeLabelWidth:j,extraLargeLabelWidth:g,realmIdAdditionalLabel:R,productsAdditionalLabel:B,ref:q,sectionId:Ne,isDisabled:v===!1?"disabled":void 0}),o.jsxRuntimeExports.jsx(f$,{children:o.jsxRuntimeExports.jsx(JR,{isSectionDisabled:Ce(C,y),sectionId:Il,isLoading:r===!0||z?.fetchState==="In-Progress"||z?.saveConnectionState==="In-Progress",accountingConnectionCreationMode:e.newOnboardingCustomerLocalData.accountingConnectionCreationMode,onQBOConnectClick:x,isConnected:T?.company.companyOnboardingInfo.onboardingInfo?.qboLinked.completed===!0,isInviteSent:T?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0||T?.company.companyOnboardingInfo.onboardingInfo?.inviteAccepted===!0,saveConnectionState:z?.saveConnectionState})})]})})]}),o.jsxRuntimeExports.jsx(t.Footer,{formId:`${Wi}_form`,primaryBtn:{label:T?.company.companyOnboardingInfo.onboardingInfo?.inviteSent===!0?Ae.texts.resendInvite:Ae.texts.sendInvite,style:{width:Fo.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isLoading:I.fetchState==="In-Progress",isDisabled:uo},cancelBtn:{label:Ae.save,style:{width:Fo.buttonWidth.value(h),display:"flex",alignItems:"center",justifyContent:"center"},isDisabled:!(t.formHasDirtyFields(b.formState.dirtyFields)||e.emailGroupFetchState.fetchState==="Completed"),isLoading:$==="In-Progress"&&r===!1,shouldResetOnCancel:!1,onClick:ke,reverseSpinnerColor:!1}})]})}const _o=e=>{const{newOnboardingCustomerLocalData:n,onboardingCompletedCompanies:r}=e;let i;const a=r.companies.find(c=>c.companyInfo.companyId===n.parentCompanyId);return a!=null&&(i={label:a.companyInfo.name,value:a.companyInfo.companyId}),{[h$]:{companyDomain:n.companyEmailDomain??pe.empty},[St]:{groupName:n.groupName??pe.empty,groupEmail:n.groupId??pe.empty,groupDescription:n.groupDescription??pe.empty},[Ne]:{name:n.name??pe.empty,entityType:{allOptions:[{label:Ae.texts.parent,value:Ae.texts.parent},{label:Ae.texts.subsidiary,value:Ae.texts.subsidiary}],selectedOption:n.isSubsidiary===!0?{label:Ae.texts.subsidiary,value:Ae.texts.subsidiary}:{label:Ae.texts.parent,value:Ae.texts.parent}},company:{selectedOption:i,allOptions:r.companies.map(c=>({label:c.companyInfo.name,value:c.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:Mn(e.allProductsList,n.selectedProducts??[]),selectedOptions:n.selectedProducts??[]}},[Il]:{accountingConnectionCreationMode:n.accountingConnectionCreationMode}}},S$=s.div`
|
|
4434
4434
|
display: flex;
|
|
4435
4435
|
justify-content: flex-start;
|
|
4436
4436
|
height: 100%;
|
|
@@ -4528,13 +4528,13 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4528
4528
|
`,Pl=p.forwardRef(({highlight:e,auditSummaryData:n,isAuditScoreLoadingCompleted:r,onClickAuditScore:i},a)=>{const c=t.useWindowSizeContext(),l=n.auditSummary,d=!r||n.fetchState==="In-Progress"||n.fetchState==="Not-Started",u=o.useTheme();let m;return l.bypassedAuditScore<=50?m=t.Colors.important:l.bypassedAuditScore<=75?m=t.Colors.alert:m=t.Colors.success,o.jsxRuntimeExports.jsx($$,{ref:a,highlight:e,isAuditScoreLoading:d,onClick:()=>!d&&i(),children:o.jsxRuntimeExports.jsxs(E$,{auditPercentage:l.bypassedAuditScore,children:[o.jsxRuntimeExports.jsxs(v$,{children:[d?o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"Standard",start:d}):o.jsxRuntimeExports.jsx(w$,{children:o.jsxRuntimeExports.jsx(o.CircularProgressbar,{value:l.bypassedAuditScore,text:`${Math.ceil(l.bypassedAuditScore)}%`,strokeWidth:10,styles:o.buildStyles({rotation:.5,strokeLinecap:"butt",pathColor:m,textColor:u.colors.primary,trailColor:u.colors.grey3,textSize:t.Space.sp4})})}),o.jsxRuntimeExports.jsx(k$,{children:o.jsxRuntimeExports.jsxs(T$,{children:[o.jsxRuntimeExports.jsxs(I$,{children:[o.jsxRuntimeExports.jsx(P$,{children:d?Ui.monthEndReport.auditScoreSectionLoadingTitle.replace("__date__",J.dateNow().subtract(1,"month").format(R$.MMMMYYYYFormat)):qt.headers.auditScore}),d?null:o.jsxRuntimeExports.jsx(L$,{children:l.fixesRequired>0?`${qt.strings.openingBrace}${l.fixesRequired} ${l.fixesRequired>1?qt.texts.issues:qt.texts.issue}${qt.strings.closingBrace}`:qt.strings.empty})]}),o.jsxRuntimeExports.jsx(A$,{children:o.jsxRuntimeExports.jsx(D$,{children:d?qt.texts.thisProcessMayTake23Min:Ui.monthEndReport.auditScoreSectionSubtitle})})]})})]}),d?null:o.jsxRuntimeExports.jsx(O$,{windowSize:c,children:o.jsxRuntimeExports.jsx(N$,{width:t.Space.sp4,height:t.Space.sp4})})]})})});Pl.displayName="MonthEndReportAuditSummarySection";const M$=[...J.SUPPORTED_ATTACHMENT_FILE_TYPES],z$=7*1024*100,F$=s.div`
|
|
4529
4529
|
width: ${t.FORM_MINIMUM_WIDTH}px;
|
|
4530
4530
|
margin: ${t.Space.sp4} ${t.Space.sp0};
|
|
4531
|
-
`,
|
|
4531
|
+
`,_$=s.div`
|
|
4532
4532
|
width: ${e=>`${e.availableWidth}px`};
|
|
4533
4533
|
min-width: auto;
|
|
4534
4534
|
position: relative;
|
|
4535
4535
|
height: fit-content;
|
|
4536
4536
|
min-height: ${t.Space.sp12};
|
|
4537
|
-
`,
|
|
4537
|
+
`,B$=s.div`
|
|
4538
4538
|
flex-grow: 1;
|
|
4539
4539
|
overflow: auto;
|
|
4540
4540
|
min-height: 2em;
|
|
@@ -4635,7 +4635,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4635
4635
|
z-index: ${t.sp[2]};
|
|
4636
4636
|
min-width: ${t.COMMENTS_SECTION_MINIMUM_WIDTH}px;
|
|
4637
4637
|
max-width: ${t.COMMENTS_DRAWER_MAXIMUM_WIDTH}px;
|
|
4638
|
-
`,fo="monthEndReportFormSection",Ki="monthEndReportPage",{common:mt,cockpit:vt,dateFormat:oE}=t.appLocale.getLocalizedStrings();function nE({companyId:e,enableZeniGPTFeature:n,enableSendingMonthEndEmail:r,monthEndReportView:i,previewMode:a,customerRequestData:c,allThreadsSectionOpen:l,filterMetaData:d,newThreadMetadata:u,isAuditScoreLoadingCompleted:m,regenerationCount:x,onAgentInsightSaveStateChange:f,improveUsingZeniGPTClick:h,onRemoveFileAttachment:S,onUpdateFileAttachment:j,onCloseAllThreadsSection:g,previewMonthEndReport:b,saveMonthEndReport:C,onEditClick:y,onOpenFileAttachmentSnackBar:E,onClickAuditScore:v,onClickCustomerRequest:$,sendMonthEndReport:I}){const w=o.useTheme(),[T,z]=p.useState(),[B,H]=p.useState(!1),{agentInsightEdits:U,agentInsightEditsRef:K,hasUnpersistedAgentEdits:W,onAgentInsightEdit:R,saveState:A}=t.useAgentInsightEdits({saveStatus:i.saveMonthEndReportStatus,save:()=>sr(),regenerationCount:x,onStateChange:f}),[_,P]=p.useState(0),[k,N]=p.useState(0),V=p.useRef(),ee=p.useRef(null),Y=p.useRef(null),Z=p.useRef(null),{html:Q,subject:F,improveUsingZeniGPTStatus:ue}=i,[q,G]=p.useState(),[ie,ae]=p.useState(!1),[me,je]=p.useState(!1),[D,de]=p.useState(!1),[le,xe]=p.useState(!1),L=p.useRef(null),ge=p.useRef(null),Te=t.useDelayUnmount(l,250),M=i.fetchState==="Not-Started"||i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:fe,sortedThreads:se,threadsPositions:te,observer:we,unresolvedThreadsMap:Se,handleRemoveFloatingThread:He}=t.useFloatingThreads(d,L,!a,M),[Ie,X]=p.useState(0),ke=p.useCallback(()=>{const Je=fe.current?.[fe.current?.length-1];X(window.scrollY+(Je?.getBoundingClientRect()?.bottom??0))},[fe]),Ce=p.useCallback(()=>{l?N(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_DRAWER_MAXIMUM_WIDTH-t.sp[4])):P(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_SECTION_MINIMUM_WIDTH))},[l]);p.useEffect(()=>{Ce()},[l,Ce]),p.useEffect(()=>(window.addEventListener("resize",Ce),()=>{window.removeEventListener("resize",Ce)}),[Ce]),p.useEffect(()=>(window.addEventListener("scroll",ke),()=>window.removeEventListener("scroll",ke)),[ke]);const{openThread:uo,addThread:Ve,setOpenThread:O}=p.useContext(t.ThreadsContext),he=t.useHandleSelection(t.MONTH_END_REPORT_CANVAS,!1,!a),Re=L.current?.getBoundingClientRect(),Oe=he!=null&&he.coords&&Re?{left:he.coords.left-Re.left,top:he.coords.top-Re.top}:void 0,Ee=p.useCallback(()=>{const Je=window.getSelection()?.getRangeAt(0),Be=t.getSelectionData();if(!Je||Be==null)return;const ut={...u,...Be,startPath:Be.startPath.join(),endPath:Be.endPath.join()},lt=`${o.nanoid()}${t.NEW_THREAD_SUFFIX}`,Vt=`cockpit_${e}`;Ve(lt,{type:"thread",visibility:"public",id:lt,roomId:Vt,createdAt:new Date,updatedAt:new Date,comments:[],metadata:ut,resolved:!1}),O(lt)},[Ve,e,u,O]),Xe=()=>{de(!0),setTimeout(()=>{de(!1)},2e3)};p.useEffect(()=>{uo!=null&&l&&g()},[l,uo,g]);const be=ue.fetchState==="In-Progress",Qe=o.useForm({mode:"all",defaultValues:Gi(i),values:Gi(i)}),qe=Qe.handleSubmit(Je=>{const{recipientEmailList:Be,subject:ut}=Je[fo],lt=i.auditSummaryData.auditSummary.bypassedAuditScore,Vt=i.auditSummaryData.isControllerOrReviewer;if(!W)if(a===!0)lt>=75?I?.(q?.id):lt<75&&(Vt||r)&&xe(!0);else if(lt>=75||lt<75&&(Vt||r)){const Ro=T?.replace(t.EMPTY_HTML_CHECKER,mt.strings.empty);Be!=null&&ut!=null&&b(Be,ut,q?.id,Ro!=null&&Ro.length>0?T:void 0,K.current)}else Fl()}),Ke=()=>{ee.current!=null&&ee.current.click()},Ue=()=>{q!==void 0&&q!=null&&(S([q.id]),G(void 0),ae(!1))},oe=Je=>{const Be=Je.target.files?Je.target.files[0]:null;if(Be)if(!J.toSupportedAttachmentFileType(Be.type)||me)console.warn("Please select a valid file.");else{const ut=new FileReader;ut.onload=function(lt){const Vt=lt.target?.result;if(typeof Vt=="string"){const Ro={data:Vt.split(",")[1],name:Be.name,id:J.getAttachmentFileIdByFileName(e,Be.name)};G(Ro),ae(!0),j([Ro])}},ut.readAsDataURL(Be)}},_n=()=>{Y.current&&Y.current.scrollIntoView({behavior:"smooth"})},Fl=()=>{Z.current&&(Z.current.scrollIntoView({behavior:"smooth"}),Xe())},sr=()=>{const Je=Qe.getValues(),{recipientEmailList:Be,subject:ut}=Je[fo];C(Be??i.recipientEmailList??[],ut??mt.strings.empty,q?.id,T,K.current)};p.useEffect(()=>{z(i.zeniRequestsHtml)},[i.zeniRequestsHtml]),p.useEffect(()=>{V.current=q},[q]),p.useEffect(()=>{G(J.mapAttachmentFileToAttachmentFilePayload(i.attachmentFile)),ae(!1)},[i.attachmentFile]),p.useEffect(()=>{me&&E()},[me,E]);const Wn=J.dateNow().subtract(1,"month").format(oE.visual.MMMMFormat),qo=Q!=null?Q.split(t.MONTH_END_EDITOR_PLACEHOLDER):[],Jo=vt.monthEndReport.agentInsights,Vn=i.templateData,Bl=!a&&t.hasAgentInsights(Vn),_l=i.concatenatedHtml,Wl=()=>i.lastDraftSavedDate!=null&&a===!1?o.jsxRuntimeExports.jsx(t.UserWithTimestamp,{time:i.lastDraftSavedDate,user:i.reportLastSavedByUser,timeStampLabel:vt.monthEndReport.timeStampLabel}):null,Vl={onOkClick:()=>{I?.(q?.id),xe(!1),Qe.reset()},onCancelClick:()=>{y==null?xe(!1):y(),xe(!1)}};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(_$,{ref:ge,style:Ie>0?{height:Ie}:void 0,children:[o.jsxRuntimeExports.jsx(B$,{availableWidth:l?k:_}),o.jsxRuntimeExports.jsxs(F$,{children:[o.jsxRuntimeExports.jsx(o.FormProvider,{...Qe,children:o.jsxRuntimeExports.jsx("form",{id:Yi(Ki),onSubmit:qe,children:o.jsxRuntimeExports.jsxs(q$,{children:[o.jsxRuntimeExports.jsx(t.MonthEndReportSection,{sectionId:fo,previewMode:a,subject:F}),a?null:o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Pl,{ref:Z,highlight:D,onClickAuditScore:v,auditSummaryData:i.auditSummaryData,isAuditScoreLoadingCompleted:m}),o.jsxRuntimeExports.jsx(t.MonthEndReportCustomerRequestSection,{totalItems:(i.zeniRequestsData??[]).length+t.getTemplatesFromTemplatedData(i.companyMonthEndReportTemplatesData).length,onClickCustomerRequest:$})]}),o.jsxRuntimeExports.jsxs(K$,{id:t.MONTH_END_REPORT_CANVAS,ref:L,children:[o.jsxRuntimeExports.jsxs(G$,{className:"monthEndReportCanvasWrapper",children:[q!=null||me?o.jsxRuntimeExports.jsx(Y$,{onClick:_n,children:o.jsxRuntimeExports.jsx(t.CircleWithAttachmentSuccessIcon,{fileSizeError:me,setFileSizeError:je,loading:!1,showAnimation:!a&&ie})}):null,a?o.jsxRuntimeExports.jsx(Hi,{dangerouslySetInnerHTML:{__html:t.getHTMLWithCommentingSections(_l)}}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[Bl?o.jsxRuntimeExports.jsxs(U$,{children:[o.jsxRuntimeExports.jsx(H$,{role:"status",children:A==="failed"?Jo.saveFailed:A==="saving"?Jo.saving:null}),o.jsxRuntimeExports.jsx(t.Button,{type:"button",size:"small",dataTestId:"agent_insights_edit_toggle",label:B?Jo.doneButtonLabel:Jo.editButtonLabel,onClick:()=>H(!B)})]}):null,o.jsxRuntimeExports.jsxs(V$,{id:t.MONTH_END_EMAIL_HEADER_SECTION,children:[B&&Vn!=null?o.jsxRuntimeExports.jsx(t.AgentInsightsEditor,{edits:U,resyncToken:x,templateData:Vn,onEdit:R}):o.jsxRuntimeExports.jsx(t.StandardRegular,{dangerouslySetInnerHTML:{__html:qo[0]!=null?qo[0]+"</body></html>":mt.strings.empty}}),o.jsxRuntimeExports.jsxs(W$,{children:[o.jsxRuntimeExports.jsx(Q$,{children:vt.monthEndReport.editorTitle}),o.jsxRuntimeExports.jsx(X$,{children:vt.monthEndReport.editorNote})]})]}),o.jsxRuntimeExports.jsx(Z$,{id:t.MONTH_END_EMAIL_EDITOR_SECTION,children:o.jsxRuntimeExports.jsx(t.Editor,{handleFileInputClick:Ke,fileAttached:q!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:be,initialHtmlString:i.zeniRequestsHtml,improveUsingZeniGPTClick:h,setZeniRequestsHtml:z,customerRequestData:c})}),B?null:o.jsxRuntimeExports.jsx(Hi,{id:t.MONTH_END_EMAIL_BODY_SECTION,dangerouslySetInnerHTML:{__html:qo[1]!=null?"<html><body>"+qo[1]:mt.strings.empty}})]}),q!=null?o.jsxRuntimeExports.jsx(t.FileAttachment,{ref:Y,fileName:q.name,fileSize:t.base64FileSize(q.data),onRemove:Ue,isRemovable:!a}):null]}),Oe?o.jsxRuntimeExports.jsx(t.AddThreadFloating,{style:{zIndex:15},coords:Oe,alignment:he.alignment,onClick:Ee}):null,o.jsxRuntimeExports.jsx(t.TextHighlightSection,{canvasContainerRef:L,sortedThreads:se,editorMode:!a})]})]})})}),o.jsxRuntimeExports.jsx(t.FileInputElement,{name:q?.name??mt.strings.empty,fileRef:ee,sizeLimit:z$,acceptableTypes:M$,onFileChange:async Je=>{oe(Je)},onFileSizeError:Je=>je(Je),multiple:!1})]}),Te?o.jsxRuntimeExports.jsx(tE,{allThreadsSectionOpen:l,children:o.jsxRuntimeExports.jsx(t.AllThreadsSection,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${w.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:w.colors.background},threadsContainerStyle:{paddingBottom:a?"160px":t.Space.sp12},collapsibleThreadStyle:{width:`calc(100% - ${t.Space.sp4})`},allowComposer:!1,drawerTitle:mt.texts.comments,filter:d,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Je,Be)=>{O(Be);const ut=se.findIndex(lt=>lt[0]===Be);g(),fe.current?.[ut]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>g()})}):o.jsxRuntimeExports.jsx(t.FloatingThreads,{observer:we,canvasContainerRef:L,sortedThreads:se,threadsPositions:te,threadsRefs:fe,unresolvedThreadsMap:Se,editorMode:!a,style:{minWidth:`${t.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${L.current?.offsetTop}px`},handleRemoveFloatingThread:He})]}),le?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:vt.monthEndReport.sendMonthInsightsTitle.replace("__month__",Wn)}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:vt.monthEndReport.sendMonthInsightsDescription.replace("__month__",Wn)}),primaryButtonText:vt.monthEndReport.sendAnyway,primaryButtonWidth:124,secondaryButtonWidth:124,proceedButtonVariant:"destructive",secondaryButtonText:mt.edit,action:Vl,containerStyle:{minWidth:356}}):null,o.jsxRuntimeExports.jsx(t.Footer,{style:{zIndex:10},leftSideComponent:Wl(),formId:Yi(Ki),helperText:a===!0?vt.monthEndReport.reportSentDateInfo:void 0,cancelBtn:{isDisabled:!m||be,label:a===!0?mt.edit:mt.texts.saveChanges,onClick:a===!0?y:sr,style:{width:"225px"},size:"medium",isLoading:i.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:!m||be||!a&&W,isLoading:a===!0?i.sendMonthEndReportStatus.fetchState==="In-Progress":i.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:a===!0?"unset":"225px"},label:a===!0?vt.monthEndReport.sendEmailButtonLabel.replace("__month__",Wn):mt.texts.preview,size:"medium"}})]})}const Gi=e=>({[fo]:{recipientEmailList:e.recipientEmailList,subject:e.subject??mt.strings.empty}}),Yi=e=>`${e}_form`,{refresh:sE}=t.appLocale.getLocalizedStrings().common.texts,rE=s(t.SmallRegular)`
|
|
4638
|
+
`,fo="monthEndReportFormSection",Ki="monthEndReportPage",{common:mt,cockpit:vt,dateFormat:oE}=t.appLocale.getLocalizedStrings();function nE({companyId:e,enableZeniGPTFeature:n,enableSendingMonthEndEmail:r,monthEndReportView:i,previewMode:a,customerRequestData:c,allThreadsSectionOpen:l,filterMetaData:d,newThreadMetadata:u,isAuditScoreLoadingCompleted:m,regenerationCount:x,onAgentInsightSaveStateChange:f,improveUsingZeniGPTClick:h,onRemoveFileAttachment:S,onUpdateFileAttachment:j,onCloseAllThreadsSection:g,previewMonthEndReport:b,saveMonthEndReport:C,onEditClick:y,onOpenFileAttachmentSnackBar:E,onClickAuditScore:v,onClickCustomerRequest:$,sendMonthEndReport:I}){const w=o.useTheme(),[T,z]=p.useState(),[_,H]=p.useState(!1),{agentInsightEdits:U,agentInsightEditsRef:K,hasUnpersistedAgentEdits:W,onAgentInsightEdit:R,saveState:A}=t.useAgentInsightEdits({saveStatus:i.saveMonthEndReportStatus,save:()=>sr(),regenerationCount:x,onStateChange:f}),[B,P]=p.useState(0),[k,N]=p.useState(0),V=p.useRef(),ee=p.useRef(null),Y=p.useRef(null),Z=p.useRef(null),{html:Q,subject:F,improveUsingZeniGPTStatus:ue}=i,[q,G]=p.useState(),[ie,ae]=p.useState(!1),[me,je]=p.useState(!1),[D,de]=p.useState(!1),[le,xe]=p.useState(!1),L=p.useRef(null),ge=p.useRef(null),Te=t.useDelayUnmount(l,250),M=i.fetchState==="Not-Started"||i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:fe,sortedThreads:se,threadsPositions:te,observer:we,unresolvedThreadsMap:Se,handleRemoveFloatingThread:He}=t.useFloatingThreads(d,L,!a,M),[Ie,X]=p.useState(0),ke=p.useCallback(()=>{const Je=fe.current?.[fe.current?.length-1];X(window.scrollY+(Je?.getBoundingClientRect()?.bottom??0))},[fe]),Ce=p.useCallback(()=>{l?N(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_DRAWER_MAXIMUM_WIDTH-t.sp[4])):P(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_SECTION_MINIMUM_WIDTH))},[l]);p.useEffect(()=>{Ce()},[l,Ce]),p.useEffect(()=>(window.addEventListener("resize",Ce),()=>{window.removeEventListener("resize",Ce)}),[Ce]),p.useEffect(()=>(window.addEventListener("scroll",ke),()=>window.removeEventListener("scroll",ke)),[ke]);const{openThread:uo,addThread:Ve,setOpenThread:O}=p.useContext(t.ThreadsContext),he=t.useHandleSelection(t.MONTH_END_REPORT_CANVAS,!1,!a),Re=L.current?.getBoundingClientRect(),Oe=he!=null&&he.coords&&Re?{left:he.coords.left-Re.left,top:he.coords.top-Re.top}:void 0,Ee=p.useCallback(()=>{const Je=window.getSelection()?.getRangeAt(0),_e=t.getSelectionData();if(!Je||_e==null)return;const ut={...u,..._e,startPath:_e.startPath.join(),endPath:_e.endPath.join()},lt=`${o.nanoid()}${t.NEW_THREAD_SUFFIX}`,Vt=`cockpit_${e}`;Ve(lt,{type:"thread",visibility:"public",id:lt,roomId:Vt,createdAt:new Date,updatedAt:new Date,comments:[],metadata:ut,resolved:!1}),O(lt)},[Ve,e,u,O]),Xe=()=>{de(!0),setTimeout(()=>{de(!1)},2e3)};p.useEffect(()=>{uo!=null&&l&&g()},[l,uo,g]);const be=ue.fetchState==="In-Progress",Qe=o.useForm({mode:"all",defaultValues:Gi(i),values:Gi(i)}),qe=Qe.handleSubmit(Je=>{const{recipientEmailList:_e,subject:ut}=Je[fo],lt=i.auditSummaryData.auditSummary.bypassedAuditScore,Vt=i.auditSummaryData.isControllerOrReviewer;if(!W)if(a===!0)lt>=75?I?.(q?.id):lt<75&&(Vt||r)&&xe(!0);else if(lt>=75||lt<75&&(Vt||r)){const Ro=T?.replace(t.EMPTY_HTML_CHECKER,mt.strings.empty);_e!=null&&ut!=null&&b(_e,ut,q?.id,Ro!=null&&Ro.length>0?T:void 0,K.current)}else Fl()}),Ke=()=>{ee.current!=null&&ee.current.click()},Ue=()=>{q!==void 0&&q!=null&&(S([q.id]),G(void 0),ae(!1))},oe=Je=>{const _e=Je.target.files?Je.target.files[0]:null;if(_e)if(!J.toSupportedAttachmentFileType(_e.type)||me)console.warn("Please select a valid file.");else{const ut=new FileReader;ut.onload=function(lt){const Vt=lt.target?.result;if(typeof Vt=="string"){const Ro={data:Vt.split(",")[1],name:_e.name,id:J.getAttachmentFileIdByFileName(e,_e.name)};G(Ro),ae(!0),j([Ro])}},ut.readAsDataURL(_e)}},Bn=()=>{Y.current&&Y.current.scrollIntoView({behavior:"smooth"})},Fl=()=>{Z.current&&(Z.current.scrollIntoView({behavior:"smooth"}),Xe())},sr=()=>{const Je=Qe.getValues(),{recipientEmailList:_e,subject:ut}=Je[fo];C(_e??i.recipientEmailList??[],ut??mt.strings.empty,q?.id,T,K.current)};p.useEffect(()=>{z(i.zeniRequestsHtml)},[i.zeniRequestsHtml]),p.useEffect(()=>{V.current=q},[q]),p.useEffect(()=>{G(J.mapAttachmentFileToAttachmentFilePayload(i.attachmentFile)),ae(!1)},[i.attachmentFile]),p.useEffect(()=>{me&&E()},[me,E]);const Wn=J.dateNow().subtract(1,"month").format(oE.visual.MMMMFormat),qo=Q!=null?Q.split(t.MONTH_END_EDITOR_PLACEHOLDER):[],Jo=vt.monthEndReport.agentInsights,Vn=i.templateData,_l=!a&&t.hasAgentInsights(Vn),Bl=i.concatenatedHtml,Wl=()=>i.lastDraftSavedDate!=null&&a===!1?o.jsxRuntimeExports.jsx(t.UserWithTimestamp,{time:i.lastDraftSavedDate,user:i.reportLastSavedByUser,timeStampLabel:vt.monthEndReport.timeStampLabel}):null,Vl={onOkClick:()=>{I?.(q?.id),xe(!1),Qe.reset()},onCancelClick:()=>{y==null?xe(!1):y(),xe(!1)}};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(B$,{ref:ge,style:Ie>0?{height:Ie}:void 0,children:[o.jsxRuntimeExports.jsx(_$,{availableWidth:l?k:B}),o.jsxRuntimeExports.jsxs(F$,{children:[o.jsxRuntimeExports.jsx(o.FormProvider,{...Qe,children:o.jsxRuntimeExports.jsx("form",{id:Yi(Ki),onSubmit:qe,children:o.jsxRuntimeExports.jsxs(q$,{children:[o.jsxRuntimeExports.jsx(t.MonthEndReportSection,{sectionId:fo,previewMode:a,subject:F}),a?null:o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Pl,{ref:Z,highlight:D,onClickAuditScore:v,auditSummaryData:i.auditSummaryData,isAuditScoreLoadingCompleted:m}),o.jsxRuntimeExports.jsx(t.MonthEndReportCustomerRequestSection,{totalItems:(i.zeniRequestsData??[]).length+t.getTemplatesFromTemplatedData(i.companyMonthEndReportTemplatesData).length,onClickCustomerRequest:$})]}),o.jsxRuntimeExports.jsxs(K$,{id:t.MONTH_END_REPORT_CANVAS,ref:L,children:[o.jsxRuntimeExports.jsxs(G$,{className:"monthEndReportCanvasWrapper",children:[q!=null||me?o.jsxRuntimeExports.jsx(Y$,{onClick:Bn,children:o.jsxRuntimeExports.jsx(t.CircleWithAttachmentSuccessIcon,{fileSizeError:me,setFileSizeError:je,loading:!1,showAnimation:!a&&ie})}):null,a?o.jsxRuntimeExports.jsx(Hi,{dangerouslySetInnerHTML:{__html:t.getHTMLWithCommentingSections(Bl)}}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[_l?o.jsxRuntimeExports.jsxs(U$,{children:[o.jsxRuntimeExports.jsx(H$,{role:"status",children:A==="failed"?Jo.saveFailed:A==="saving"?Jo.saving:null}),o.jsxRuntimeExports.jsx(t.Button,{type:"button",size:"small",dataTestId:"agent_insights_edit_toggle",label:_?Jo.doneButtonLabel:Jo.editButtonLabel,onClick:()=>H(!_)})]}):null,o.jsxRuntimeExports.jsxs(V$,{id:t.MONTH_END_EMAIL_HEADER_SECTION,children:[_&&Vn!=null?o.jsxRuntimeExports.jsx(t.AgentInsightsEditor,{edits:U,resyncToken:x,templateData:Vn,onEdit:R}):o.jsxRuntimeExports.jsx(t.StandardRegular,{dangerouslySetInnerHTML:{__html:qo[0]!=null?qo[0]+"</body></html>":mt.strings.empty}}),o.jsxRuntimeExports.jsxs(W$,{children:[o.jsxRuntimeExports.jsx(Q$,{children:vt.monthEndReport.editorTitle}),o.jsxRuntimeExports.jsx(X$,{children:vt.monthEndReport.editorNote})]})]}),o.jsxRuntimeExports.jsx(Z$,{id:t.MONTH_END_EMAIL_EDITOR_SECTION,children:o.jsxRuntimeExports.jsx(t.Editor,{handleFileInputClick:Ke,fileAttached:q!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:be,initialHtmlString:i.zeniRequestsHtml,improveUsingZeniGPTClick:h,setZeniRequestsHtml:z,customerRequestData:c})}),_?null:o.jsxRuntimeExports.jsx(Hi,{id:t.MONTH_END_EMAIL_BODY_SECTION,dangerouslySetInnerHTML:{__html:qo[1]!=null?"<html><body>"+qo[1]:mt.strings.empty}})]}),q!=null?o.jsxRuntimeExports.jsx(t.FileAttachment,{ref:Y,fileName:q.name,fileSize:t.base64FileSize(q.data),onRemove:Ue,isRemovable:!a}):null]}),Oe?o.jsxRuntimeExports.jsx(t.AddThreadFloating,{style:{zIndex:15},coords:Oe,alignment:he.alignment,onClick:Ee}):null,o.jsxRuntimeExports.jsx(t.TextHighlightSection,{canvasContainerRef:L,sortedThreads:se,editorMode:!a})]})]})})}),o.jsxRuntimeExports.jsx(t.FileInputElement,{name:q?.name??mt.strings.empty,fileRef:ee,sizeLimit:z$,acceptableTypes:M$,onFileChange:async Je=>{oe(Je)},onFileSizeError:Je=>je(Je),multiple:!1})]}),Te?o.jsxRuntimeExports.jsx(tE,{allThreadsSectionOpen:l,children:o.jsxRuntimeExports.jsx(t.AllThreadsSection,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${w.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:w.colors.background},threadsContainerStyle:{paddingBottom:a?"160px":t.Space.sp12},collapsibleThreadStyle:{width:`calc(100% - ${t.Space.sp4})`},allowComposer:!1,drawerTitle:mt.texts.comments,filter:d,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Je,_e)=>{O(_e);const ut=se.findIndex(lt=>lt[0]===_e);g(),fe.current?.[ut]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>g()})}):o.jsxRuntimeExports.jsx(t.FloatingThreads,{observer:we,canvasContainerRef:L,sortedThreads:se,threadsPositions:te,threadsRefs:fe,unresolvedThreadsMap:Se,editorMode:!a,style:{minWidth:`${t.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${L.current?.offsetTop}px`},handleRemoveFloatingThread:He})]}),le?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:vt.monthEndReport.sendMonthInsightsTitle.replace("__month__",Wn)}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:vt.monthEndReport.sendMonthInsightsDescription.replace("__month__",Wn)}),primaryButtonText:vt.monthEndReport.sendAnyway,primaryButtonWidth:124,secondaryButtonWidth:124,proceedButtonVariant:"destructive",secondaryButtonText:mt.edit,action:Vl,containerStyle:{minWidth:356}}):null,o.jsxRuntimeExports.jsx(t.Footer,{style:{zIndex:10},leftSideComponent:Wl(),formId:Yi(Ki),helperText:a===!0?vt.monthEndReport.reportSentDateInfo:void 0,cancelBtn:{isDisabled:!m||be,label:a===!0?mt.edit:mt.texts.saveChanges,onClick:a===!0?y:sr,style:{width:"225px"},size:"medium",isLoading:i.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:!m||be||!a&&W,isLoading:a===!0?i.sendMonthEndReportStatus.fetchState==="In-Progress":i.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:a===!0?"unset":"225px"},label:a===!0?vt.monthEndReport.sendEmailButtonLabel.replace("__month__",Wn):mt.texts.preview,size:"medium"}})]})}const Gi=e=>({[fo]:{recipientEmailList:e.recipientEmailList,subject:e.subject??mt.strings.empty}}),Yi=e=>`${e}_form`,{refresh:sE}=t.appLocale.getLocalizedStrings().common.texts,rE=s(t.SmallRegular)`
|
|
4639
4639
|
color: ${e=>e.theme.colors.hero};
|
|
4640
4640
|
display: flex;
|
|
4641
4641
|
align-items: center;
|
|
@@ -4733,7 +4733,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4733
4733
|
`,fE=s(t.SvgReload)`
|
|
4734
4734
|
width: ${t.Space.sp10};
|
|
4735
4735
|
height: ${t.Space.sp10};
|
|
4736
|
-
`,{dateFormat:{visual:{MMSlashYYYYFormat:CE}},cockpit:{monthEndReport:{insightsNotAvailable:jE,agentInsights:{regenerateTitle:bE,regenerateDescription:RE,regenerateConfirm:$E}}},common:{errorMessage:{somethingWentWrong:EE},cancel:vE}}=t.appLocale.getLocalizedStrings(),Zi=({message:e,onReload:n})=>o.jsxRuntimeExports.jsxs(yE,{onClick:n,children:[o.jsxRuntimeExports.jsx(fE,{}),o.jsxRuntimeExports.jsx(SE,{children:e})]}),wE=e=>{const{monthEndReportView:n,companyId:r,previewMode:i,onRefresh:a,onNavigateBack:c}=e,{openThread:l,setOpenThread:d}=p.useContext(t.ThreadsContext),u=J.dateNow().subtract(1,"month").format(CE),[m,x]=p.useState(!1),[f,h]=p.useState(!1),[S,j]=p.useState(0),[g,b]=p.useState({hasUnpersistedEdits:!1,isPending:!1}),C=g.isPending,[y,E]=p.useState(!1),v=p.useCallback(()=>{j(U=>U+1),a()},[a]),$=p.useCallback(()=>{if(C){E(!0);return}v()},[C,v]);p.useEffect(()=>{y&&!C&&(E(!1),v())},[y,C,v]);const I=()=>{if(n.agentInsightsEditedAt!=null||g.hasUnpersistedEdits){h(!0);return}$()};if(n.fetchState==="Not-Started"||n.fetchState==="In-Progress"||n.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||n.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return o.jsxRuntimeExports.jsx(vn,{children:o.jsxRuntimeExports.jsx(gE,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})})});if(n.fetchState==="Error"||n.companyMonthEndReportTemplatesData.fetchState==="Error")return o.jsxRuntimeExports.jsx(vn,{children:o.jsxRuntimeExports.jsx(Zi,{onReload:a,message:EE})});if(n.html==null)return o.jsxRuntimeExports.jsx(vn,{children:o.jsxRuntimeExports.jsx(Zi,{onReload:a,message:jE})});const w={application:"cockpit",companyId:r,entityId:r,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:n.companyName,url:window.location.href,selectedRange:u},{url:T,...z}=w,
|
|
4736
|
+
`,{dateFormat:{visual:{MMSlashYYYYFormat:CE}},cockpit:{monthEndReport:{insightsNotAvailable:jE,agentInsights:{regenerateTitle:bE,regenerateDescription:RE,regenerateConfirm:$E}}},common:{errorMessage:{somethingWentWrong:EE},cancel:vE}}=t.appLocale.getLocalizedStrings(),Zi=({message:e,onReload:n})=>o.jsxRuntimeExports.jsxs(yE,{onClick:n,children:[o.jsxRuntimeExports.jsx(fE,{}),o.jsxRuntimeExports.jsx(SE,{children:e})]}),wE=e=>{const{monthEndReportView:n,companyId:r,previewMode:i,onRefresh:a,onNavigateBack:c}=e,{openThread:l,setOpenThread:d}=p.useContext(t.ThreadsContext),u=J.dateNow().subtract(1,"month").format(CE),[m,x]=p.useState(!1),[f,h]=p.useState(!1),[S,j]=p.useState(0),[g,b]=p.useState({hasUnpersistedEdits:!1,isPending:!1}),C=g.isPending,[y,E]=p.useState(!1),v=p.useCallback(()=>{j(U=>U+1),a()},[a]),$=p.useCallback(()=>{if(C){E(!0);return}v()},[C,v]);p.useEffect(()=>{y&&!C&&(E(!1),v())},[y,C,v]);const I=()=>{if(n.agentInsightsEditedAt!=null||g.hasUnpersistedEdits){h(!0);return}$()};if(n.fetchState==="Not-Started"||n.fetchState==="In-Progress"||n.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||n.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return o.jsxRuntimeExports.jsx(vn,{children:o.jsxRuntimeExports.jsx(gE,{children:o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"ExtraLarge",start:!0})})});if(n.fetchState==="Error"||n.companyMonthEndReportTemplatesData.fetchState==="Error")return o.jsxRuntimeExports.jsx(vn,{children:o.jsxRuntimeExports.jsx(Zi,{onReload:a,message:EE})});if(n.html==null)return o.jsxRuntimeExports.jsx(vn,{children:o.jsxRuntimeExports.jsx(Zi,{onReload:a,message:jE})});const w={application:"cockpit",companyId:r,entityId:r,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:n.companyName,url:window.location.href,selectedRange:u},{url:T,...z}=w,_={...z},H=`cockpit_${r}`;return o.jsxRuntimeExports.jsx(ot.RoomProvider,{id:H,children:o.jsxRuntimeExports.jsxs(vn,{children:[o.jsxRuntimeExports.jsx(Ll,{companyName:n.companyName,threadMetadata:_,onAllThreadsClick:()=>{l!=null&&d(null),x(!0)},onNavigateBack:c,onRefresh:I}),o.jsxRuntimeExports.jsx(nE,{...e,allThreadsSectionOpen:m,filterMetaData:_,newThreadMetadata:w,regenerationCount:S,onAgentInsightSaveStateChange:b,onCloseAllThreadsSection:()=>x(!1)},`${i}_${r}_${n.templateData?.insight_month_year??""}`),f?o.jsxRuntimeExports.jsx(t.ConfirmationPopup,{titleComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpTitle,{children:bE}),descriptionComponent:o.jsxRuntimeExports.jsx(t.ConfirmationPopUpDescription,{children:RE}),primaryButtonText:$E,secondaryButtonText:vE,primaryButtonWidth:168,secondaryButtonWidth:124,action:{onOkClick:()=>{h(!1),$()},onCancelClick:()=>h(!1),onClickAway:()=>h(!1)}}):null]})})},Es=s.div`
|
|
4737
4737
|
display: flex;
|
|
4738
4738
|
justify-content: flex-end;
|
|
4739
4739
|
align-items: center;
|
|
@@ -4849,14 +4849,14 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4849
4849
|
width: ${t.Space.sp1};
|
|
4850
4850
|
height: ${t.Space.sp1};
|
|
4851
4851
|
background-color: ${e=>e.theme.colors.grey1};
|
|
4852
|
-
`,
|
|
4852
|
+
`,_E=s.div`
|
|
4853
4853
|
display: flex;
|
|
4854
4854
|
align-items: center;
|
|
4855
4855
|
column-gap: ${t.Space.sp2};
|
|
4856
4856
|
padding-bottom: ${t.Space.sp5};
|
|
4857
|
-
`,
|
|
4857
|
+
`,BE=s(t.ExtraSmallRegular)`
|
|
4858
4858
|
color: ${e=>e.theme.colors.grey1};
|
|
4859
|
-
`,{common:{strings:_s,datePicker:WE,texts:VE,errorMessage:{somethingWentWrong:UE}},dateFormat:Ws,cockpit:HE}=t.appLocale.getLocalizedStrings(),{slash:Xi}=_s,{visual:{YYYYformat:KE,MMMformat:GE}}=Ws,YE=({historicData:e,companyId:n,newThreadMetadata:r,containerRef:i,sortedThreads:a})=>{const{addThread:c,setOpenThread:l}=p.useContext(t.ThreadsContext),d=p.useRef(null),[u,m]=p.useState(),[x,f]=p.useState(!1),h="monthEndReportHistoricDataPage",S=t.useHandleSelection(t.MONTH_END_REPORT_CANVAS,!1,!1),j=i.current?.getBoundingClientRect(),g=S!=null&&S.coords!=null&&j?{left:S.coords.left-j.left,top:S.coords.top-j.top}:void 0,b=o.useForm({mode:"all",defaultValues:Qi(e),values:Qi(e)}),C=()=>{d.current&&d.current.scrollIntoView({behavior:"smooth"})};p.useEffect(()=>{m(J.mapAttachmentFileToAttachmentFilePayload(e.attachmentFile))},[e.attachmentFile]);const y=p.useCallback(()=>{const E=window.getSelection()?.getRangeAt(0),v=t.getSelectionData();if(!E||v==null)return;const $={...r,...v,startPath:v.startPath.join(),endPath:v.endPath.join()},I=`${o.nanoid()}${t.NEW_THREAD_SUFFIX}`,w=`cockpit_${n}`;c(I,{type:"thread",visibility:"public",id:I,roomId:w,createdAt:new Date,updatedAt:new Date,comments:[],metadata:$,resolved:!1}),l(I)},[c,n,r,l]);return o.jsxRuntimeExports.jsx(o.FormProvider,{...b,children:o.jsxRuntimeExports.jsx("form",{id:XE(h),children:o.jsxRuntimeExports.jsxs(zE,{children:[o.jsxRuntimeExports.jsx(t.MonthEndReportSection,{previewMode:!0,subject:e.subject,sectionId:fo}),o.jsxRuntimeExports.jsxs(kE,{id:t.MONTH_END_REPORT_CANVAS,ref:i,children:[o.jsxRuntimeExports.jsxs(TE,{className:"monthEndReportCanvasWrapper",children:[u!=null?o.jsxRuntimeExports.jsx(IE,{onClick:C,children:o.jsxRuntimeExports.jsx(t.CircleWithAttachmentSuccessIcon,{loading:!1,fileSizeError:x,setFileSizeError:f})}):null,o.jsxRuntimeExports.jsx(t.StandardRegular,{style:{position:"relative"},dangerouslySetInnerHTML:{__html:t.getHTMLWithCommentingSections(e.concatenatedHtml)}}),u!=null?o.jsxRuntimeExports.jsx(t.FileAttachment,{ref:d,fileName:u.name,fileSize:t.base64FileSize(u.data),isRemovable:!1}):null]}),g?o.jsxRuntimeExports.jsx(t.AddThreadFloating,{style:{zIndex:15},coords:g,alignment:S.alignment,onClick:y}):null,o.jsxRuntimeExports.jsx(t.TextHighlightSection,{canvasContainerRef:i,sortedThreads:a,editorMode:!1})]})]})})})},ZE=e=>{const{monthEndReportHistoricData:n,reportSentDate:r,onRefresh:i,onNavigateBack:a,onDateChange:c}=e,l=o.useTheme(),[d,u]=p.useState(!1),[m,x]=p.useState(),f=p.useRef(null),[h,S]=p.useState(0),[j,g]=p.useState(0),b=t.useDelayUnmount(d,250),{data:C,companyId:y,companyName:E,firstMonthOfFY:v}=n,$=t.getMonthIndex(r.format(Ws.visual.MMMMFormat)),I=Number(r.format(KE)),w=v>$?I-1:I;p.useEffect(()=>{const G=$>0?$-1:12;x(`${o.padStart(G.toString(),2,"0")}${Xi}${I}`)},[]);const T={application:"cockpit",companyId:y,entityId:y,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:E,url:window.location.href,selectedRange:m},{url:z,...B}=T,H={...B},U=n.fetchState==="Not-Started"||n.fetchState==="In-Progress",{threadsRefs:K,sortedThreads:W,threadsPositions:R,observer:A,unresolvedThreadsMap:_,handleRemoveFloatingThread:P}=t.useFloatingThreads(H,f,!1,U),k=p.useRef(null),[N,V]=p.useState(0),ee=p.useCallback(()=>{const G=K.current?.[K.current?.length-1];V(window.scrollY+(G?.getBoundingClientRect()?.bottom??0))},[K]),Y=p.useCallback(()=>{d?g(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_DRAWER_MAXIMUM_WIDTH-t.sp[4])):S(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_SECTION_MINIMUM_WIDTH))},[d]);p.useEffect(()=>{Y()},[d,Y]),p.useEffect(()=>(window.addEventListener("resize",Y),()=>{window.removeEventListener("resize",Y)}),[Y]),p.useEffect(()=>(window.addEventListener("scroll",ee),()=>window.removeEventListener("scroll",ee)),[ee]);const{openThread:Z,setOpenThread:Q}=p.useContext(t.ThreadsContext);p.useEffect(()=>{Z!=null&&d&&u(!1)},[d,Z,u]);const F=t.getHistoricMonthsList(v,n.historicReportSentDates),ue=p.useCallback((G,ie)=>{const ae=v>G?ie+1:ie;c(J.dateFromYearMonthDate(ae,G-1));const me=G>0?G-1:12;x(`${o.padStart(me.toString(),2,"0")}${Xi}${ae}`)},[v,c]);if(n.fetchState==="Not-Started"||n.fetchState==="In-Progress")return o.jsxRuntimeExports.jsxs(vs,{children:[o.jsxRuntimeExports.jsx(Es,{children:o.jsxRuntimeExports.jsx(ws,{onClick:a})}),o.jsxRuntimeExports.jsx(t.BusyIndication,{fetchState:n.fetchState,styles:{margin:t.Space.sp0}})]});if(n.fetchState==="Error")return o.jsxRuntimeExports.jsxs(vs,{children:[o.jsxRuntimeExports.jsx(Es,{children:o.jsxRuntimeExports.jsx(ws,{onClick:a})}),o.jsxRuntimeExports.jsx(t.ReloadContainer,{onReload:i,message:UE})]});if(C?.concatenatedHtml==null)return o.jsxRuntimeExports.jsxs(vs,{children:[o.jsxRuntimeExports.jsx(Es,{children:o.jsxRuntimeExports.jsx(ws,{onClick:a})}),o.jsxRuntimeExports.jsx(t.ReloadContainer,{onReload:i,message:HE.monthEndReport.insightsNotAvailable})]});const q=`cockpit_${y}`;return o.jsxRuntimeExports.jsx(ot.RoomProvider,{id:q,children:o.jsxRuntimeExports.jsxs(PE,{children:[o.jsxRuntimeExports.jsx(Ll,{companyName:n.companyName,onNavigateBack:a,monthCalendar:{monthAndYears:F,label:`${r.format(GE)} ${w}`,selectedMonth:{month:$,year:w},onChange:ue},threadMetadata:H,onAllThreadsClick:()=>{Z!=null&&Q(null),u(!0)}}),o.jsxRuntimeExports.jsxs(NE,{ref:k,style:N>0?{height:N}:void 0,children:[o.jsxRuntimeExports.jsx(LE,{availableWidth:d?j:h}),o.jsxRuntimeExports.jsxs(ME,{children:[o.jsxRuntimeExports.jsx(YE,{historicData:C,newThreadMetadata:T,companyId:y,sortedThreads:W,containerRef:f}),o.jsxRuntimeExports.jsxs(BE,{children:[o.jsxRuntimeExports.jsx(Ma,{user:n.reportLastSentByUser}),o.jsxRuntimeExports.jsx(FE,{}),o.jsxRuntimeExports.jsxs(_E,{children:[WE.businessDay,_s.space,n.data?.reportSentDate!=null?J.getBusinessDayOfDate(n.data.reportSentDate):null,":",_s.space,n.data?.reportSentDate?.format(Ws.visual.MMMDFormat)]})]})]}),b?o.jsxRuntimeExports.jsx(OE,{allThreadsSectionOpen:d,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:VE.comments,filter:H,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(G,ie)=>{Q(ie);const ae=W.findIndex(me=>me[0]===ie);u(!1),K.current?.[ae]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>u(!1)})}):o.jsxRuntimeExports.jsx(t.FloatingThreads,{observer:A,canvasContainerRef:f,sortedThreads:W,threadsPositions:R,threadsRefs:K,unresolvedThreadsMap:_,editorMode:!1,style:{minWidth:`${t.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${f.current?.offsetTop}px`},handleRemoveFloatingThread:P})]})]})})},Qi=e=>({[fo]:{recipientEmailList:e.recipientEmailList??[],subject:e.subject??""}}),XE=e=>`${e}_form`,QE=e=>ce.createElement("svg",{width:98,height:121,viewBox:"0 0 98 121",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.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"})),{cockpit:{review:{reachedZeni:qE}}}=t.appLocale.getLocalizedStrings(),JE=s.div`
|
|
4859
|
+
`,{common:{strings:Bs,datePicker:WE,texts:VE,errorMessage:{somethingWentWrong:UE}},dateFormat:Ws,cockpit:HE}=t.appLocale.getLocalizedStrings(),{slash:Xi}=Bs,{visual:{YYYYformat:KE,MMMformat:GE}}=Ws,YE=({historicData:e,companyId:n,newThreadMetadata:r,containerRef:i,sortedThreads:a})=>{const{addThread:c,setOpenThread:l}=p.useContext(t.ThreadsContext),d=p.useRef(null),[u,m]=p.useState(),[x,f]=p.useState(!1),h="monthEndReportHistoricDataPage",S=t.useHandleSelection(t.MONTH_END_REPORT_CANVAS,!1,!1),j=i.current?.getBoundingClientRect(),g=S!=null&&S.coords!=null&&j?{left:S.coords.left-j.left,top:S.coords.top-j.top}:void 0,b=o.useForm({mode:"all",defaultValues:Qi(e),values:Qi(e)}),C=()=>{d.current&&d.current.scrollIntoView({behavior:"smooth"})};p.useEffect(()=>{m(J.mapAttachmentFileToAttachmentFilePayload(e.attachmentFile))},[e.attachmentFile]);const y=p.useCallback(()=>{const E=window.getSelection()?.getRangeAt(0),v=t.getSelectionData();if(!E||v==null)return;const $={...r,...v,startPath:v.startPath.join(),endPath:v.endPath.join()},I=`${o.nanoid()}${t.NEW_THREAD_SUFFIX}`,w=`cockpit_${n}`;c(I,{type:"thread",visibility:"public",id:I,roomId:w,createdAt:new Date,updatedAt:new Date,comments:[],metadata:$,resolved:!1}),l(I)},[c,n,r,l]);return o.jsxRuntimeExports.jsx(o.FormProvider,{...b,children:o.jsxRuntimeExports.jsx("form",{id:XE(h),children:o.jsxRuntimeExports.jsxs(zE,{children:[o.jsxRuntimeExports.jsx(t.MonthEndReportSection,{previewMode:!0,subject:e.subject,sectionId:fo}),o.jsxRuntimeExports.jsxs(kE,{id:t.MONTH_END_REPORT_CANVAS,ref:i,children:[o.jsxRuntimeExports.jsxs(TE,{className:"monthEndReportCanvasWrapper",children:[u!=null?o.jsxRuntimeExports.jsx(IE,{onClick:C,children:o.jsxRuntimeExports.jsx(t.CircleWithAttachmentSuccessIcon,{loading:!1,fileSizeError:x,setFileSizeError:f})}):null,o.jsxRuntimeExports.jsx(t.StandardRegular,{style:{position:"relative"},dangerouslySetInnerHTML:{__html:t.getHTMLWithCommentingSections(e.concatenatedHtml)}}),u!=null?o.jsxRuntimeExports.jsx(t.FileAttachment,{ref:d,fileName:u.name,fileSize:t.base64FileSize(u.data),isRemovable:!1}):null]}),g?o.jsxRuntimeExports.jsx(t.AddThreadFloating,{style:{zIndex:15},coords:g,alignment:S.alignment,onClick:y}):null,o.jsxRuntimeExports.jsx(t.TextHighlightSection,{canvasContainerRef:i,sortedThreads:a,editorMode:!1})]})]})})})},ZE=e=>{const{monthEndReportHistoricData:n,reportSentDate:r,onRefresh:i,onNavigateBack:a,onDateChange:c}=e,l=o.useTheme(),[d,u]=p.useState(!1),[m,x]=p.useState(),f=p.useRef(null),[h,S]=p.useState(0),[j,g]=p.useState(0),b=t.useDelayUnmount(d,250),{data:C,companyId:y,companyName:E,firstMonthOfFY:v}=n,$=t.getMonthIndex(r.format(Ws.visual.MMMMFormat)),I=Number(r.format(KE)),w=v>$?I-1:I;p.useEffect(()=>{const G=$>0?$-1:12;x(`${o.padStart(G.toString(),2,"0")}${Xi}${I}`)},[]);const T={application:"cockpit",companyId:y,entityId:y,tab:"management",isGlobalComment:!1,entityType:"management.monthEndEmail",companyName:E,url:window.location.href,selectedRange:m},{url:z,..._}=T,H={..._},U=n.fetchState==="Not-Started"||n.fetchState==="In-Progress",{threadsRefs:K,sortedThreads:W,threadsPositions:R,observer:A,unresolvedThreadsMap:B,handleRemoveFloatingThread:P}=t.useFloatingThreads(H,f,!1,U),k=p.useRef(null),[N,V]=p.useState(0),ee=p.useCallback(()=>{const G=K.current?.[K.current?.length-1];V(window.scrollY+(G?.getBoundingClientRect()?.bottom??0))},[K]),Y=p.useCallback(()=>{d?g(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_DRAWER_MAXIMUM_WIDTH-t.sp[4])):S(Math.min((window.innerWidth-t.FORM_MINIMUM_WIDTH)/2,window.innerWidth-t.FORM_MINIMUM_WIDTH-t.COMMENTS_SECTION_MINIMUM_WIDTH))},[d]);p.useEffect(()=>{Y()},[d,Y]),p.useEffect(()=>(window.addEventListener("resize",Y),()=>{window.removeEventListener("resize",Y)}),[Y]),p.useEffect(()=>(window.addEventListener("scroll",ee),()=>window.removeEventListener("scroll",ee)),[ee]);const{openThread:Z,setOpenThread:Q}=p.useContext(t.ThreadsContext);p.useEffect(()=>{Z!=null&&d&&u(!1)},[d,Z,u]);const F=t.getHistoricMonthsList(v,n.historicReportSentDates),ue=p.useCallback((G,ie)=>{const ae=v>G?ie+1:ie;c(J.dateFromYearMonthDate(ae,G-1));const me=G>0?G-1:12;x(`${o.padStart(me.toString(),2,"0")}${Xi}${ae}`)},[v,c]);if(n.fetchState==="Not-Started"||n.fetchState==="In-Progress")return o.jsxRuntimeExports.jsxs(vs,{children:[o.jsxRuntimeExports.jsx(Es,{children:o.jsxRuntimeExports.jsx(ws,{onClick:a})}),o.jsxRuntimeExports.jsx(t.BusyIndication,{fetchState:n.fetchState,styles:{margin:t.Space.sp0}})]});if(n.fetchState==="Error")return o.jsxRuntimeExports.jsxs(vs,{children:[o.jsxRuntimeExports.jsx(Es,{children:o.jsxRuntimeExports.jsx(ws,{onClick:a})}),o.jsxRuntimeExports.jsx(t.ReloadContainer,{onReload:i,message:UE})]});if(C?.concatenatedHtml==null)return o.jsxRuntimeExports.jsxs(vs,{children:[o.jsxRuntimeExports.jsx(Es,{children:o.jsxRuntimeExports.jsx(ws,{onClick:a})}),o.jsxRuntimeExports.jsx(t.ReloadContainer,{onReload:i,message:HE.monthEndReport.insightsNotAvailable})]});const q=`cockpit_${y}`;return o.jsxRuntimeExports.jsx(ot.RoomProvider,{id:q,children:o.jsxRuntimeExports.jsxs(PE,{children:[o.jsxRuntimeExports.jsx(Ll,{companyName:n.companyName,onNavigateBack:a,monthCalendar:{monthAndYears:F,label:`${r.format(GE)} ${w}`,selectedMonth:{month:$,year:w},onChange:ue},threadMetadata:H,onAllThreadsClick:()=>{Z!=null&&Q(null),u(!0)}}),o.jsxRuntimeExports.jsxs(NE,{ref:k,style:N>0?{height:N}:void 0,children:[o.jsxRuntimeExports.jsx(LE,{availableWidth:d?j:h}),o.jsxRuntimeExports.jsxs(ME,{children:[o.jsxRuntimeExports.jsx(YE,{historicData:C,newThreadMetadata:T,companyId:y,sortedThreads:W,containerRef:f}),o.jsxRuntimeExports.jsxs(_E,{children:[o.jsxRuntimeExports.jsx(Ma,{user:n.reportLastSentByUser}),o.jsxRuntimeExports.jsx(FE,{}),o.jsxRuntimeExports.jsxs(BE,{children:[WE.businessDay,Bs.space,n.data?.reportSentDate!=null?J.getBusinessDayOfDate(n.data.reportSentDate):null,":",Bs.space,n.data?.reportSentDate?.format(Ws.visual.MMMDFormat)]})]})]}),b?o.jsxRuntimeExports.jsx(OE,{allThreadsSectionOpen:d,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:VE.comments,filter:H,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(G,ie)=>{Q(ie);const ae=W.findIndex(me=>me[0]===ie);u(!1),K.current?.[ae]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>u(!1)})}):o.jsxRuntimeExports.jsx(t.FloatingThreads,{observer:A,canvasContainerRef:f,sortedThreads:W,threadsPositions:R,threadsRefs:K,unresolvedThreadsMap:B,editorMode:!1,style:{minWidth:`${t.COMMENTS_SECTION_MINIMUM_WIDTH}px`,position:"relative",height:"fit-content",width:"auto",top:`${f.current?.offsetTop}px`},handleRemoveFloatingThread:P})]})]})})},Qi=e=>({[fo]:{recipientEmailList:e.recipientEmailList??[],subject:e.subject??""}}),XE=e=>`${e}_form`,QE=e=>ce.createElement("svg",{width:98,height:121,viewBox:"0 0 98 121",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ce.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"})),{cockpit:{review:{reachedZeni:qE}}}=t.appLocale.getLocalizedStrings(),JE=s.div`
|
|
4860
4860
|
justify-content: center;
|
|
4861
4861
|
align-items: center;
|
|
4862
4862
|
display: flex;
|
|
@@ -4871,7 +4871,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4871
4871
|
color: ${e=>e.theme.colors.hero};
|
|
4872
4872
|
`,t5=s(t.StandardRegular)`
|
|
4873
4873
|
color: ${e=>e.theme.colors.grey1};
|
|
4874
|
-
`,o5=()=>o.jsxRuntimeExports.jsxs(JE,{children:[o.jsxRuntimeExports.jsx(e5,{}),o.jsxRuntimeExports.jsx(t5,{children:qE})]}),{cockpit:{review:{header:{miscategorizedTransactions:n5,uncategorizedTransactions:s5}}},common:{headers:{auditScore:r5},texts:{name:i5,reviewVendor:a5,warnings:l5}}}=t.appLocale.getLocalizedStrings(),
|
|
4874
|
+
`,o5=()=>o.jsxRuntimeExports.jsxs(JE,{children:[o.jsxRuntimeExports.jsx(e5,{}),o.jsxRuntimeExports.jsx(t5,{children:qE})]}),{cockpit:{review:{header:{miscategorizedTransactions:n5,uncategorizedTransactions:s5}}},common:{headers:{auditScore:r5},texts:{name:i5,reviewVendor:a5,warnings:l5}}}=t.appLocale.getLocalizedStrings(),_t=[{key:"companyName",value:i5,sortOrder:"ascending",width:new t.ResponsiveSized(400,400),isThreadAllowed:!0},{key:"auditScore",value:r5,sortOrder:"descending",width:new t.ResponsiveSized(235,235),isThreadAllowed:!0},{key:"uncategorized",value:s5,sortOrder:"ascending",width:new t.ResponsiveSized(300,300),isThreadAllowed:!0},{key:"miscategorized",value:n5,sortOrder:"ascending",width:new t.ResponsiveSized(300,300),isThreadAllowed:!0},{key:"reviewVendor",value:a5,sortOrder:"ascending",width:new t.ResponsiveSized(225,225),isThreadAllowed:!0},{key:"warnings",value:l5,sortOrder:"descending",width:new t.ResponsiveSized(125,125),isThreadAllowed:!0}];_t.map(e=>e.key);function c5({companyNameSticky:e,isReviewVendorColumnVisible:n,sortConfig:r,onColumnSortConfigChanged:i}){const a=t.useWindowSizeContext(),[c,l]=p.useState(o.cloneDeep(n?_t:_t.filter(u=>u.key!=="reviewVendor")));p.useEffect(()=>{const u=[...c];for(const m of u)m.key===r.sortKey&&(m.sortOrder=r.sortOrder);l(u)},[r.sortKey,r.sortOrder]);const d=(u,m)=>{let x=m;r.sortKey===u&&(x=m==="ascending"?"descending":"ascending"),i(u,x??void 0)};return o.jsxRuntimeExports.jsx(m5,{height:io,children:c.map(u=>o.jsxRuntimeExports.jsxs(x5,{sortDataValue:r.sortKey,actualDataValue:u.key,widthSize:u.width,companyNameSticky:e&&u.key==="companyName",windowSize:a,children:[o.jsxRuntimeExports.jsxs(h5,{onClick:()=>d(u.key,u.sortOrder),disabled:u.sortOrder==null,children:[o.jsxRuntimeExports.jsx(t.ExtraSmallRegular,{children:u.value}),u.sortOrder!=null&&o.jsxRuntimeExports.jsx(u5,{sortDataValue:r.sortKey,headerdata:u,children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:12,height:12})})]}),o.jsxRuntimeExports.jsx(p5,{isVisible:r.sortKey===u.key&&r.sortKey!=="companyName",children:o.jsxRuntimeExports.jsx(d5,{onClick:()=>d("companyName","ascending")})})]},u.key))})}const d5=s(t.SvgCloseRound)`
|
|
4875
4875
|
cursor: pointer;
|
|
4876
4876
|
width: 12px;
|
|
4877
4877
|
height: 12px;
|
|
@@ -4989,7 +4989,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
4989
4989
|
`,O5=s.div`
|
|
4990
4990
|
border-left: 1px solid ${e=>e.theme.colors.grey2};
|
|
4991
4991
|
height: ${t.Space.sp4};
|
|
4992
|
-
`,Ji=({income:e,expense:n,showTickForDisabled:r=!0,onTransactionTagClicked:i})=>o.jsxRuntimeExports.jsxs(D5,{children:[o.jsxRuntimeExports.jsx(qi,{text:L5,showTickForDisabled:r,disabled:!n,color:t.getTransactionTagColor("expense"),onClick:()=>i?.("expense")}),o.jsxRuntimeExports.jsx(O5,{}),o.jsxRuntimeExports.jsx(qi,{text:A5,disabled:!e,showTickForDisabled:r,color:t.getTransactionTagColor("income"),onClick:()=>i?.("income")})]}),N5=({companyId:e,warningsCount:n,onClick:r})=>{const i=()=>{r(e)};return o.jsxRuntimeExports.jsx(M5,{onClick:i,children:n===0?o.jsxRuntimeExports.jsx(F5,{}):o.jsxRuntimeExports.jsxs(
|
|
4992
|
+
`,Ji=({income:e,expense:n,showTickForDisabled:r=!0,onTransactionTagClicked:i})=>o.jsxRuntimeExports.jsxs(D5,{children:[o.jsxRuntimeExports.jsx(qi,{text:L5,showTickForDisabled:r,disabled:!n,color:t.getTransactionTagColor("expense"),onClick:()=>i?.("expense")}),o.jsxRuntimeExports.jsx(O5,{}),o.jsxRuntimeExports.jsx(qi,{text:A5,disabled:!e,showTickForDisabled:r,color:t.getTransactionTagColor("income"),onClick:()=>i?.("income")})]}),N5=({companyId:e,warningsCount:n,onClick:r})=>{const i=()=>{r(e)};return o.jsxRuntimeExports.jsx(M5,{onClick:i,children:n===0?o.jsxRuntimeExports.jsx(F5,{}):o.jsxRuntimeExports.jsxs(B5,{children:[o.jsxRuntimeExports.jsx(_5,{})," ",o.jsxRuntimeExports.jsx(z5,{children:n})]})})},M5=s.div`
|
|
4993
4993
|
display: flex;
|
|
4994
4994
|
align-items: center;
|
|
4995
4995
|
cursor: pointer;
|
|
@@ -5000,14 +5000,14 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5000
5000
|
width: ${t.Space.sp3};
|
|
5001
5001
|
height: ${t.Space.sp3};
|
|
5002
5002
|
color: ${t.Colors.success};
|
|
5003
|
-
`,
|
|
5003
|
+
`,_5=s(t.SvgHighImportance)`
|
|
5004
5004
|
width: ${t.Space.sp3};
|
|
5005
5005
|
height: ${t.Space.sp3};
|
|
5006
5006
|
color: ${t.Colors.important};
|
|
5007
|
-
`,
|
|
5007
|
+
`,B5=s.div`
|
|
5008
5008
|
display: flex;
|
|
5009
5009
|
align-items: center;
|
|
5010
|
-
`,{cockpit:{review:{selectUncategorizedAccounts:W5}},dateFormat:{visual:{MMMYYYYFormat:V5},analytics:{MMSlashDDSlashYYYYFormat:U5}}}=t.appLocale.getLocalizedStrings(),H5=({companyView:e,companyNameSticky:n,isReviewVendorColumnVisible:r,totalHeight:i,analytics:a,addThreadRequestThreadId:c,setNoteData:l,setElementRef:d,setAddThreadRequestThreadId:u,onTransactionTagClicked:m,onClickAuditScore:x,onClickWarningsCount:f,onCompanyNameClicked:h,onUncategorizedAccountsErrorClick:S,onReviewVendorTagClicked:j})=>{const g=t.useWindowSizeContext(),{name:b,companyId:C}=e,y=`cockpit_${C}`,E="audit.notes",{threads:v,isLoading:$}=t.useFilteredThreads({entityType:E,companyId:C},!1),{openThread:I,threads:w,addThread:T,removeThread:z,setOpenThread:
|
|
5010
|
+
`,{cockpit:{review:{selectUncategorizedAccounts:W5}},dateFormat:{visual:{MMMYYYYFormat:V5},analytics:{MMSlashDDSlashYYYYFormat:U5}}}=t.appLocale.getLocalizedStrings(),H5=({companyView:e,companyNameSticky:n,isReviewVendorColumnVisible:r,totalHeight:i,analytics:a,addThreadRequestThreadId:c,setNoteData:l,setElementRef:d,setAddThreadRequestThreadId:u,onTransactionTagClicked:m,onClickAuditScore:x,onClickWarningsCount:f,onCompanyNameClicked:h,onUncategorizedAccountsErrorClick:S,onReviewVendorTagClicked:j})=>{const g=t.useWindowSizeContext(),{name:b,companyId:C}=e,y=`cockpit_${C}`,E="audit.notes",{threads:v,isLoading:$}=t.useFilteredThreads({entityType:E,companyId:C},!1),{openThread:I,threads:w,addThread:T,removeThread:z,setOpenThread:_,setRequestToOpenThread:H}=p.useContext(t.ThreadsContext),U=p.useRef(null),K=I!==null?w.get(I):null,W=I?.includes(C)===!0,R=I!=null&&w.get(I)==null&&W,A=c!=null&&w.get(c)?.metadata.companyId===C,B=p.useCallback(()=>{I?.includes(t.NEW_THREAD_SUFFIX)===!0&&z(I),c!=null&&u(void 0)},[c,I,z,u]),P=F=>o.jsxRuntimeExports.jsx(t.StickyThread,{isElementThreadOpen:F.isElementThreadOpen??!1,isElementThreadPresent:F.isElementThreadPresent??!1,itemKey:F.itemKey,elementThreadId:F.elementThreadId??"",roomId:y,addThreadRequestThreadId:c,openThreadId:I,threadStyle:F.threadStyle,openThreadMetadata:K?.metadata??null,onElementClick:N,onAddThreadClick:V}),k=p.useCallback(F=>{if(F===I)_(null);else if(w.has(F))_(F);else if(F.includes(t.NEW_THREAD_SUFFIX)){const[ue,q]=F.replace(t.NEW_THREAD_SUFFIX,"").split("."),G=co(Bt(ue),J.toReviewColumnKeyType(q),C,b);T(F,{type:"thread",visibility:"public",id:F,roomId:y,createdAt:new Date,updatedAt:new Date,comments:[],metadata:G,resolved:!1}),_(F)}},[C,b,I,w,T,_,y]),N=p.useCallback((F,ue,q=!1)=>{const G=_t.find(ie=>ie.key===ue);if(H(null),G!=null&&(F.type==="contextmenu"||q===!0)){if(G.isThreadAllowed===!1)return;B(),F.preventDefault(),F.stopPropagation();const ie=t.toCollaborationEntityType({tab:"audit",key:G.key}),ae=[...t.getFilteredThreads(w,{entityType:ie,companyId:C},"both")],me=ae.length>0&&ae[0].length>0?ae[0][0]:Le("audit",G.key,C);w.has(me)?k(me):c===me?u(void 0):(u(me),_(null))}},[w,C,c,k,u,_,H,B]),V=p.useCallback((F,ue)=>{F.stopPropagation();const q=Le("audit",ue,C);u(void 0),k(q)},[C,u,k]),ee=()=>{h(e)},Y=p.useCallback(()=>{S(e.primaryEmailDomain)},[S,e.primaryEmailDomain]),Z=()=>{if(e.auditSummary.auditReportLastGeneratedDate==null){const F=J.dateNow().startOf("month").subtract(1,"date").format(V5),ue=e.controllers?.map(q=>`${q.user.firstName} ${q.user.middleName} ${q.user.lastName}`)??[];a.trackGetAuditScore(!0,e.name,F,ue,J.dateNow().format(U5))}x(e.companyId)},Q=e.onboardingInfo?.uncategorizedExpenseAccountIdentified===!0&&e.onboardingInfo?.uncategorizedIncomeAccountIdentified===!0;return o.jsxRuntimeExports.jsx(o.ClickAwayListener,{onClickAway:()=>{H(null),c!=null&&(u(void 0),c.includes(t.NEW_THREAD_SUFFIX)&&z(c))},children:o.jsxRuntimeExports.jsx(X5,{windowSize:g,isThreadOpen:W||A,totalHeight:i,isCreationInProgress:R,children:_t.map((F,ue)=>{const q=t.toCollaborationEntityType({tab:"audit",key:F.key}),G=_t.length-2<=ue,ie=[...t.getFilteredThreads(w,{entityType:q,companyId:C},"both")],ae=ie.length>0&&ie[0].length>0?ie[0][0]:Le("audit",F.key,C),me=w.get(ae),je=me!=null&&me.resolved===!1,D=ae===I,de=c===ae;switch(F.key){case"companyName":return o.jsxRuntimeExports.jsxs(G5,{companyNameSticky:n,columnWidth:F.width,windowSize:g,isThreadOpen:D||de,isThreadAllowed:F.isThreadAllowed,className:ne,onContextMenu:le=>N(le,F.key),ref:le=>{d(C,F.key,le)},children:[o.jsxRuntimeExports.jsxs(Z5,{ref:U,children:[o.jsxRuntimeExports.jsx(Y5,{onClick:le=>{le.preventDefault(),ee()},children:b}),o.jsxRuntimeExports.jsx(t.ThreadComponent,{anchorRef:U,isElementThreadOpen:D,roomId:y,openThreadId:I,openThreadMetadata:K?.metadata??null})]}),o.jsxRuntimeExports.jsxs(Q5,{className:"notesIcon",onClick:le=>{le.preventDefault(),l({roomId:y,companyId:C,companyName:b,entityType:E})},children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:v.length,isLoading:$}),o.jsxRuntimeExports.jsx(q5,{})]}),o.jsxRuntimeExports.jsx(t.ThreadDotComponent,{isElementThreadPresent:je,itemKey:F.key,style:{left:t.Space.sp4},onElementClick:N}),o.jsxRuntimeExports.jsx(t.AddThreadsComponent,{elementThreadId:Le("audit",F.key,C),addThreadRequestThreadId:c,itemKey:F.key,onAddThreadClick:V})]},ae);case"auditScore":return o.jsxRuntimeExports.jsxs(Bo,{ref:le=>{d(C,F.key,le)},columnWidth:F.width,windowSize:g,isThreadAllowed:F.isThreadAllowed,className:ne,onContextMenu:le=>N(le,F.key),children:[o.jsxRuntimeExports.jsx(j5,{auditSummary:e.auditSummary,onClickScore:Z}),P({isElementThreadOpen:D,isElementThreadPresent:je,itemKey:F.key,elementThreadId:ae,threadStyle:G?{right:t.Space.sp0}:void 0})]},ae);case"uncategorized":return o.jsxRuntimeExports.jsxs(Bo,{ref:le=>{d(C,F.key,le)},columnWidth:F.width,windowSize:g,isThreadAllowed:F.isThreadAllowed,className:ne,onContextMenu:le=>N(le,F.key),children:[Q===!0?o.jsxRuntimeExports.jsx(Ji,{onTransactionTagClicked:le=>m(e,le,"uncategorized"),...e.uncategorizedTransactions}):o.jsxRuntimeExports.jsxs(ev,{onClick:Y,children:[o.jsxRuntimeExports.jsx(t.SvgHighImportance,{className:"alert-icon",width:t.sp[3],height:t.sp[3]}),o.jsxRuntimeExports.jsx(J5,{children:W5})]}),P({isElementThreadOpen:D,isElementThreadPresent:je,itemKey:F.key,elementThreadId:ae,threadStyle:G?{right:t.Space.sp0}:void 0})]},ae);case"miscategorized":return o.jsxRuntimeExports.jsxs(Bo,{ref:le=>{d(C,F.key,le)},columnWidth:F.width,windowSize:g,isThreadAllowed:F.isThreadAllowed,className:ne,onContextMenu:le=>N(le,F.key),children:[o.jsxRuntimeExports.jsx(Ji,{onTransactionTagClicked:le=>m(e,le,"miscategorized"),...e.miscategorizedTransactions}),P({isElementThreadOpen:D,isElementThreadPresent:je,itemKey:F.key,elementThreadId:ae,threadStyle:G?{right:t.Space.sp0}:void 0})]},ae);case"reviewVendor":return r?o.jsxRuntimeExports.jsxs(Bo,{ref:le=>{d(C,F.key,le)},columnWidth:F.width,windowSize:g,isThreadAllowed:F.isThreadAllowed,className:ne,onContextMenu:le=>N(le,F.key),children:[o.jsxRuntimeExports.jsx(K5,{widthSize:F.width,windowSize:g,children:o.jsxRuntimeExports.jsx(k5,{onReviewVendorTagClicked:()=>j(e),isReviewComplete:!e.isVendorReviewReqiured})}),P({isElementThreadOpen:D,isElementThreadPresent:je,itemKey:F.key,elementThreadId:ae,threadStyle:G?{right:t.Space.sp0}:void 0})]},ae):null;case"warnings":return o.jsxRuntimeExports.jsxs(Bo,{ref:le=>{d(C,F.key,le)},columnWidth:F.width,windowSize:g,isThreadAllowed:F.isThreadAllowed,className:ne,onContextMenu:le=>N(le,F.key),children:[o.jsxRuntimeExports.jsx(N5,{companyId:e.companyId,warningsCount:J.getAuditWarningsCount(e),onClick:f}),P({isElementThreadOpen:D,isElementThreadPresent:je,itemKey:F.key,elementThreadId:ae,threadStyle:G?{right:t.Space.sp0}:void 0})]},ae);default:return null}})})})},K5=s.div`
|
|
5011
5011
|
display: flex;
|
|
5012
5012
|
align-items: flex-start;
|
|
5013
5013
|
width: ${e=>e.widthSize.valuePx(e.windowSize)};
|
|
@@ -5108,7 +5108,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5108
5108
|
height: ${t.Space.sp4};
|
|
5109
5109
|
align-items: center;
|
|
5110
5110
|
justify-content: center;
|
|
5111
|
-
`,
|
|
5111
|
+
`,Bo=s.div`
|
|
5112
5112
|
width: ${e=>e.columnWidth.valuePx(e.windowSize)};
|
|
5113
5113
|
max-width: ${e=>e.columnWidth.valuePx(e.windowSize)};
|
|
5114
5114
|
display: flex;
|
|
@@ -5135,7 +5135,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5135
5135
|
svg {
|
|
5136
5136
|
color: ${t.Colors.important};
|
|
5137
5137
|
}
|
|
5138
|
-
`,{collaboration:{threads:{placeholder:{addANewComment:tv,replyAComment:ov},tooltip:{resolveComment:nv,unResolveComment:sv}}},common:{texts:{comments:rv}}}=t.appLocale.getLocalizedStrings(),iv=({reviewView:e,allUsers:n,isReviewVendorColumnVisible:r,analytics:i,onColumnSortConfigChanged:a,onClickAuditScore:c,onClickWarningsCount:l,onTransactionTagClicked:d,onCompanyNameClicked:u,onRetryBankAccountConnection:m,onUncategorizedAccountsErrorClick:x,onReviewVendorTagClicked:f,initialOpenThreadRequest:h})=>{const S=t.useWindowSizeContext(),j=p.useRef(null),[g,b]=p.useState(null),[C,y]=p.useState(null),{uiState:E}=e,v=!(S==="small"||S==="medium-compact"),$=R=>e.companies[R].name.length>lo?De+32:De;p.useEffect(()=>{j.current&&j.current.resetAfterIndex(0)},[e]);const{setOpenThread:I,setRequestToOpenThread:w,requestToOpenThread:T,isLoading:z}=p.useContext(t.ThreadsContext);p.useEffect(()=>{h!=null&&e.fetchState==="Completed"&&z===!1&&w(h)},[h,e.fetchState,z,w]);const[
|
|
5138
|
+
`,{collaboration:{threads:{placeholder:{addANewComment:tv,replyAComment:ov},tooltip:{resolveComment:nv,unResolveComment:sv}}},common:{texts:{comments:rv}}}=t.appLocale.getLocalizedStrings(),iv=({reviewView:e,allUsers:n,isReviewVendorColumnVisible:r,analytics:i,onColumnSortConfigChanged:a,onClickAuditScore:c,onClickWarningsCount:l,onTransactionTagClicked:d,onCompanyNameClicked:u,onRetryBankAccountConnection:m,onUncategorizedAccountsErrorClick:x,onReviewVendorTagClicked:f,initialOpenThreadRequest:h})=>{const S=t.useWindowSizeContext(),j=p.useRef(null),[g,b]=p.useState(null),[C,y]=p.useState(null),{uiState:E}=e,v=!(S==="small"||S==="medium-compact"),$=R=>e.companies[R].name.length>lo?De+32:De;p.useEffect(()=>{j.current&&j.current.resetAfterIndex(0)},[e]);const{setOpenThread:I,setRequestToOpenThread:w,requestToOpenThread:T,isLoading:z}=p.useContext(t.ThreadsContext);p.useEffect(()=>{h!=null&&e.fetchState==="Completed"&&z===!1&&w(h)},[h,e.fetchState,z,w]);const[_,H]=p.useState(void 0),U=p.useRef([]),K=p.useMemo(()=>({makeCompanyNameSticky:v,uiState:E,isReviewVendorColumnVisible:r,onColumnSortConfigChanged:a}),[v,E,r,a]),W=p.useCallback((R,A,B)=>{const P=e.companies.findIndex(N=>N.companyId===R),k=_t.findIndex(N=>N.key===A);P!==-1&&k!==-1&&(U.current[P]==null?U.current[P]=[B]:U.current[P][k]=B)},[e.companies]);return p.useEffect(()=>{if(T!=null&&g!=null){const{companyId:R,entityType:A}=T,[B,P]=A.split("."),k=e.companies.findIndex(Y=>Y.companyId===R),N=_t.findIndex(Y=>Y.key===P);k!==-1&&!(g.visibleStartIndex<=k&&g.visibleStopIndex>=k)&&j.current?.scrollToItem(k,"center"),setTimeout(()=>{const Y=U.current[k]?.[0]?.getBoundingClientRect().bottom,Z=U.current[k]?.[0]?.getBoundingClientRect().top;Y!=null&&Z!=null&&(window.innerHeight>=Y&&window.innerHeight>=Z||Z<0)&&U.current[k][N]?.scrollIntoView({block:"center",behavior:"auto"})},0);const ee=setInterval(()=>{const Y=U.current[k]?.[N]?.getBoundingClientRect().left,Z=U.current[k]?.[N]?.getBoundingClientRect().right,Q=U.current[k]?.[N]?.offsetWidth;if(Y!=null&&Q!=null&&Z!=null&&(Y<window.innerWidth-Q||Z<window.innerWidth)){clearInterval(ee);const F=T.threadId,ue=T.onThreadShownCallback;F&&(w(null),I(T.threadId),ue?.())}},500);setTimeout(()=>{clearInterval(ee),w(null)},2e3)}},[T,g,I,w]),o.jsxRuntimeExports.jsx(av,{children:o.jsxRuntimeExports.jsxs(Al.Provider,{value:K,children:[o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:R,width:A})=>o.jsxRuntimeExports.jsx(o.VariableSizeList,{height:R,innerElementType:Dl,itemCount:e.companies.length,itemSize:$,onItemsRendered:B=>b(B),itemData:{reviewView:e,isReviewVendorColumnVisible:r,analytics:i,makeCompanyNameSticky:v,allUsers:n,addThreadRequestThreadId:_,setElementRef:W,setAddThreadRequestThreadId:H,setNoteData:y,onTransactionTagClicked:d,onCompanyNameClicked:u,onRetryBankAccountConnection:m,onUncategorizedAccountsErrorClick:x,onReviewVendorTagClicked:f,onClickAuditScore:c,onClickWarningsCount:l},width:A,ref:j,overscanCount:ao,children:Ol})}),C!=null?o.jsxRuntimeExports.jsx(ot.RoomProvider,{id:C.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${C.companyName} ${rv}`,filter:{application:"cockpit",companyId:C.companyId,entityType:C.entityType,isGlobalComment:!1,tab:"audit"},isLoading:!1,threadMetadata:{companyName:C.companyName,companyId:C.companyId,entityId:C.companyId,entityType:C.entityType,isGlobalComment:!1,application:"cockpit",tab:"audit",url:window.location.href},textOverrides:{composerPlaceholder:tv,replyComposerPlaceholder:ov,threadResolve:nv,threadUnResolve:sv},onThreadClick:R=>null,onCloseAllThreadsDrawer:()=>y(null)})}):null]})})},Al=p.createContext(void 0),Dl=p.forwardRef((e,n)=>{const{children:r,style:i,...a}=e,{makeCompanyNameSticky:c,uiState:l,isReviewVendorColumnVisible:d,onColumnSortConfigChanged:u}=p.useContext(Al);return o.jsxRuntimeExports.jsxs(dv,{ref:n,style:{...i,width:"auto"},...a,children:[o.jsxRuntimeExports.jsx(c5,{companyNameSticky:c,onColumnSortConfigChanged:u,sortConfig:{sortKey:l.sortKey,sortOrder:l.sortOrder},isReviewVendorColumnVisible:d}),o.jsxRuntimeExports.jsx(cv,{children:r})]})});Dl.displayName="Review list view inner element type";const Ol=({index:e,style:n,data:r})=>{const{reviewView:i,isReviewVendorColumnVisible:a,makeCompanyNameSticky:c,allUsers:l,analytics:d,addThreadRequestThreadId:u,setElementRef:m,setNoteData:x,onCompanyNameClicked:f,onTransactionTagClicked:h,setAddThreadRequestThreadId:S,onUncategorizedAccountsErrorClick:j,onReviewVendorTagClicked:g,onClickAuditScore:b,onClickWarningsCount:C}=r,y=i.companies[e],{companyId:E}=y;return o.jsxRuntimeExports.jsx(lv,{style:{...n,width:"fit-content",minWidth:"100%"},children:o.jsxRuntimeExports.jsx(H5,{totalHeight:typeof n.height=="number"?n.height:De,addThreadRequestThreadId:u,setNoteData:x,setElementRef:m,setAddThreadRequestThreadId:S,analytics:d,companyView:i.companies[e],isReviewVendorColumnVisible:a,companyNameSticky:c,onCompanyNameClicked:f,onTransactionTagClicked:h,allUsers:l,onUncategorizedAccountsErrorClick:j,onReviewVendorTagClicked:g,onClickWarningsCount:C,onClickAuditScore:b})},E)};Ol.displayName="ListItem";const av=s.div`
|
|
5139
5139
|
/** Subtract top so list can occupy remaining available height */
|
|
5140
5140
|
height: calc(100vh - 150px);
|
|
5141
5141
|
max-width: 99.9%;
|
|
@@ -5212,7 +5212,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5212
5212
|
`,Tv=s(t.StandardRegular)`
|
|
5213
5213
|
margin-bottom: ${t.Space.sp4};
|
|
5214
5214
|
color: ${e=>e.theme.colors.hero};
|
|
5215
|
-
`,Iv=({auditSummaryData:e,isAuditScoreLoadingCompleted:n,isMonthEnd:r})=>{const i=!n,a=o.useTheme(),c=e,l=r?c.bypassedAuditScore:c.auditScorePercentage;let d;l<=50?d=t.Colors.important:l<=75?d=t.Colors.alert:d=t.Colors.success;const u=p.useCallback(()=>c.fixesRequired>0?`${Nt.strings.openingBrace}${c.fixesRequired} ${c.fixesRequired>1?Nt.texts.issues:Nt.texts.issue}${Nt.strings.closingBrace}`:Nt.strings.empty,[c.fixesRequired]);return o.jsxRuntimeExports.jsx(fv,{isAuditScoreLoading:i,children:o.jsxRuntimeExports.jsx(jv,{auditPercentage:l,children:o.jsxRuntimeExports.jsxs(Cv,{children:[!i&&o.jsxRuntimeExports.jsx(bv,{children:o.jsxRuntimeExports.jsx(o.CircularProgressbar,{value:l,text:`${Math.ceil(l)}${Nt.strings.percentage}`,strokeWidth:10,styles:o.buildStyles({rotation:.5,strokeLinecap:"butt",pathColor:d,textColor:a.colors.primary,trailColor:a.colors.grey3,textSize:t.Space.sp4})})}),o.jsxRuntimeExports.jsx(Rv,{children:o.jsxRuntimeExports.jsxs($v,{children:[o.jsxRuntimeExports.jsxs(Ev,{children:[o.jsxRuntimeExports.jsx(vv,{children:i?ea.monthEndReport.auditScoreSectionLoadingTitle.replace("__date__",J.dateNow().subtract(1,"month").format(yv.visual.MMMMYYYYFormat)):Nt.headers.auditScore}),i?null:o.jsxRuntimeExports.jsx(wv,{children:u()})]}),o.jsxRuntimeExports.jsx(kv,{children:o.jsxRuntimeExports.jsx(Tv,{children:i?Nt.texts.thisProcessMayTake23Min:ea.review.auditReportDrawer.reportGeneratedSubtitle})})]})})]})})})},{cockpit:ta,common:Ts}=t.appLocale.getLocalizedStrings(),Pv=({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})},Lv=({rule:e,commentsText:n,ruleGroup:r,isControllerOrReviewer:i,triggerComponent:a,setCommentsText:c,handleReasonAuditRule:l})=>{const[d,u]=p.useState(!1),[m,x]=p.useState(n),f=p.useRef(null),h=o.useTheme();p.useEffect(()=>{n!==""&&u(!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:()=>{u(!1)},children:o.jsxRuntimeExports.jsxs(
|
|
5215
|
+
`,Iv=({auditSummaryData:e,isAuditScoreLoadingCompleted:n,isMonthEnd:r})=>{const i=!n,a=o.useTheme(),c=e,l=r?c.bypassedAuditScore:c.auditScorePercentage;let d;l<=50?d=t.Colors.important:l<=75?d=t.Colors.alert:d=t.Colors.success;const u=p.useCallback(()=>c.fixesRequired>0?`${Nt.strings.openingBrace}${c.fixesRequired} ${c.fixesRequired>1?Nt.texts.issues:Nt.texts.issue}${Nt.strings.closingBrace}`:Nt.strings.empty,[c.fixesRequired]);return o.jsxRuntimeExports.jsx(fv,{isAuditScoreLoading:i,children:o.jsxRuntimeExports.jsx(jv,{auditPercentage:l,children:o.jsxRuntimeExports.jsxs(Cv,{children:[!i&&o.jsxRuntimeExports.jsx(bv,{children:o.jsxRuntimeExports.jsx(o.CircularProgressbar,{value:l,text:`${Math.ceil(l)}${Nt.strings.percentage}`,strokeWidth:10,styles:o.buildStyles({rotation:.5,strokeLinecap:"butt",pathColor:d,textColor:a.colors.primary,trailColor:a.colors.grey3,textSize:t.Space.sp4})})}),o.jsxRuntimeExports.jsx(Rv,{children:o.jsxRuntimeExports.jsxs($v,{children:[o.jsxRuntimeExports.jsxs(Ev,{children:[o.jsxRuntimeExports.jsx(vv,{children:i?ea.monthEndReport.auditScoreSectionLoadingTitle.replace("__date__",J.dateNow().subtract(1,"month").format(yv.visual.MMMMYYYYFormat)):Nt.headers.auditScore}),i?null:o.jsxRuntimeExports.jsx(wv,{children:u()})]}),o.jsxRuntimeExports.jsx(kv,{children:o.jsxRuntimeExports.jsx(Tv,{children:i?Nt.texts.thisProcessMayTake23Min:ea.review.auditReportDrawer.reportGeneratedSubtitle})})]})})]})})})},{cockpit:ta,common:Ts}=t.appLocale.getLocalizedStrings(),Pv=({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})},Lv=({rule:e,commentsText:n,ruleGroup:r,isControllerOrReviewer:i,triggerComponent:a,setCommentsText:c,handleReasonAuditRule:l})=>{const[d,u]=p.useState(!1),[m,x]=p.useState(n),f=p.useRef(null),h=o.useTheme();p.useEffect(()=>{n!==""&&u(!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:()=>{u(!1)},children:o.jsxRuntimeExports.jsxs(Bv,{ref:f,children:[a!=null?o.jsxRuntimeExports.jsxs(_v,{className:"placeholder",onClick:()=>{u(!d)},children:[a," "]}):null,d?o.jsxRuntimeExports.jsxs(Pv,{open:d,anchorElement:f.current,onClose:()=>u(!1),children:[o.jsxRuntimeExports.jsx(Ov,{children:o.jsxRuntimeExports.jsx(Av,{children:ta.review.auditReportDrawer.commentTitle})}),o.jsxRuntimeExports.jsx(Wv,{autoFocus:!0,onFocus:j=>{if(j.target instanceof HTMLTextAreaElement){const g=j.target.value;j.target.value="",j.target.value=g}},placeholder:ta.commentPlaceholder,value:m,onChange:j=>{j.target instanceof HTMLTextAreaElement&&x(j.target.value)}}),o.jsxRuntimeExports.jsx(Mv,{}),o.jsxRuntimeExports.jsx(zv,{}),o.jsxRuntimeExports.jsxs(Dv,{children:[o.jsxRuntimeExports.jsx(Fv,{}),o.jsxRuntimeExports.jsxs(Nv,{children:[o.jsxRuntimeExports.jsx(Vv,{disabled:e.reasonUpdateFetchState.fetchState==="In-Progress",size:"small",style:{whiteSpace:"nowrap",padding:`${t.Space.sp1} ${t.Space.sp3}`,borderRadius:t.Space.sp2},textStyle:{color:h.colors.primary},label:Ts.cancel,onClick:()=>{n!==""&&l(e.auditRuleId,r.auditRuleGroupId,n,"pending"),c(""),u(!1)}}),o.jsxRuntimeExports.jsx(Uv,{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?Ts.resolve:Ts.send,loading:e.reasonUpdateFetchState.fetchState==="In-Progress"})]})]})]}):null]})})},Av=s(t.LargeRegular)`
|
|
5216
5216
|
color: ${e=>e.theme.colors.primary};
|
|
5217
5217
|
margin-bottom: ${t.Space.sp3};
|
|
5218
5218
|
`,Dv=s.div`
|
|
@@ -5237,7 +5237,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5237
5237
|
`,Fv=s.div`
|
|
5238
5238
|
height: ${t.Space.sp2};
|
|
5239
5239
|
width: 100%;
|
|
5240
|
-
`,
|
|
5240
|
+
`,_v=s.div`
|
|
5241
5241
|
height: ${t.Space.sp4};
|
|
5242
5242
|
position: relative;
|
|
5243
5243
|
color: ${e=>e.theme.colors.grey1};
|
|
@@ -5245,7 +5245,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5245
5245
|
&:hover {
|
|
5246
5246
|
cursor: pointer;
|
|
5247
5247
|
}
|
|
5248
|
-
`,
|
|
5248
|
+
`,Bv=s.div`
|
|
5249
5249
|
position: relative;
|
|
5250
5250
|
`,Wv=s(t.LargeRegularTA)`
|
|
5251
5251
|
width: 432px;
|
|
@@ -5434,7 +5434,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5434
5434
|
width: ${t.Space.sp4};
|
|
5435
5435
|
height: ${t.Space.sp4};
|
|
5436
5436
|
color: ${e=>e.theme.colors.grey2};
|
|
5437
|
-
`,Vs={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:zw},timeFormat:Fw,common:Wo,dateFormat:Is}=t.appLocale.getLocalizedStrings(),
|
|
5437
|
+
`,Vs={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:zw},timeFormat:Fw,common:Wo,dateFormat:Is}=t.appLocale.getLocalizedStrings(),_w=({isAuditScoreCompleted:e,auditRuleGroups:n,loggedInUser:r,isMonthEnd:i,auditReportGroupView:a,allUsers:c,reviewCompanyView:l,style:d,analytics:u,handleFetchAuditReportGroupView:m,handleGenerateAuditReport:x,handleCancelIconClick:f,handleRuleClick:h,handleReasonAuditRule:S})=>{const j=t.useWindowSizeContext(),[g,b]=p.useState(Ps(n,1)),[C,y]=p.useState({id:n[0]?.auditRuleGroupId,index:0}),[E,v]=p.useState(!1),[$,I]=p.useState(1),[w,T]=p.useState(!1),[z,_]=p.useState(null),H=p.useMemo(()=>l?.controllers.map(P=>`${P.user.firstName} ${P.user.middleName} ${P.user.lastName}`)??[],[l?.controllers]),U={fixesRequired:0,totalChecks:0,auditScorePercentage:0,bypassedAuditScore:0,auditReportLastGeneratedDate:null};p.useEffect(()=>{a.auditReportGroups.forEach(P=>{a.auditReportGroups.forEach(N=>{N.auditReportGroupId===C.id&&(N.fetchState==="Completed"||N.fetchState==="Error")&&y({id:n[C.index+1]?.auditRuleGroupId,index:C.index+1})});const k=P.auditReport?.auditRulesGroupReport.find(N=>N.auditRuleGroupId===P.auditReportGroupId);(P.fetchState==="Completed"&&C.id===P.auditReportGroupId&&g[P.auditReportGroupId].isActive===!0&&k?.sequence===$||P.fetchState==="Error"&&C.id===P.auditReportGroupId)&&(I($+1),b(Ps(n,$+1)))})},[a.auditReportGroups,$,n,g]),p.useEffect(()=>{if(a.auditReportGroups.filter(V=>V.fetchState==="In-Progress").length===0&&v(!0),a.auditReportGroups.filter(V=>V.fetchState==="Completed"||V.fetchState==="Error").length===n.length){T(!0);let V=0;a.auditReportGroups.forEach(F=>{V=V+Nl(F.auditReport?.auditRulesGroupReport[0]?.auditRules)});const ee=Bw(a),Y=J.dateNow().startOf("month").subtract(1,"date").format(Is.visual.MMMYYYYFormat),Z=l?.customerGroup,Q=Math.ceil(a.auditReportGroups[0].auditReport?.auditSummary.auditScorePercentage??0);u.trackAuditScorePercentage(J.dateNow().format(Is.analytics.MMSlashDDSlashYYYYFormat),Y,Q,l?.name??"",ee,V,H,Z??null)}const N=a.auditReportGroups.find(V=>V.fetchState==="Completed");N?.auditReport?.status?.lastRefreshSuccessTime!=null&&_(N)},[a.auditReportGroups,n.length,u,l,a,H]);const K=()=>{b(Ps(n,1)),y({id:n[0]?.auditRuleGroupId,index:0}),v(!1),I(1),T(!1),_(null)},W=()=>{K();const P=n.map(k=>k.auditRuleGroupId);x(P)},R=()=>{f()},A=P=>{m(P)},B=(P,k,N)=>{u.trackAuditIssuesClicked(N,l?.name??"",H,J.dateNow().format(Is.analytics.MMSlashDDSlashYYYYFormat)),h(P,k)};return o.jsxRuntimeExports.jsxs(Ww,{style:d,children:[o.jsxRuntimeExports.jsx(Kw,{windowSize:j,style:d,children:o.jsxRuntimeExports.jsx(Gw,{children:o.jsxRuntimeExports.jsxs(Yw,{windowSize:j,children:[o.jsxRuntimeExports.jsx(Vw,{}),o.jsxRuntimeExports.jsxs(Zw,{children:[o.jsxRuntimeExports.jsx(Xw,{children:l?.name}),o.jsxRuntimeExports.jsx(Qw,{children:w?z?.auditReport?.status?.lastRefreshSuccessTime?.utc(!0).local().format(Fw.hmmADashDDMMMCommaYYYY):Wo.strings.empty})]}),o.jsxRuntimeExports.jsxs(Jw,{children:[o.jsxRuntimeExports.jsxs(qw,{isGenerateClickEnabled:E,onClick:W,children:[o.jsxRuntimeExports.jsx(t7,{}),o.jsxRuntimeExports.jsx(e7,{children:zw.auditReportDrawer.updateScore})]}),o.jsxRuntimeExports.jsx(o7,{onClick:R,children:o.jsxRuntimeExports.jsx(n7,{})})]})]})})}),o.jsxRuntimeExports.jsxs(Uw,{children:[o.jsxRuntimeExports.jsx(Hw,{children:o.jsxRuntimeExports.jsx(Iv,{auditSummaryData:l!=null?l.auditSummary:U,isAuditScoreLoadingCompleted:w&&e,isMonthEnd:i})}),o.jsxRuntimeExports.jsxs(sa,{children:[o.jsxRuntimeExports.jsx(ra,{children:Wo.texts.business}),o.jsxRuntimeExports.jsx(ia,{children:n.filter(P=>P.ruleType===Wo.texts.business.toLowerCase()).map(P=>{const k=a.auditReportGroups.find(N=>N.auditReportGroupId===P.auditRuleGroupId);return k!=null&&Object.keys(g).length>0?o.jsxRuntimeExports.jsx(oa,{loggedInUser:r,isControllerOrReviewer:a.isControllerOrReviewer,allUsers:c,isMonthEnd:i,ruleGroup:P,groupIdWithActiveStatus:g,auditReportGroup:k,setGroupIdWithActiveStatus:b,onClickRetryGroupFetch:A,onClickRule:B,handleReasonAuditRule:S},P.auditRuleGroupId):null})})]}),o.jsxRuntimeExports.jsxs(sa,{children:[o.jsxRuntimeExports.jsx(ra,{children:Wo.settings.title.accounting}),o.jsxRuntimeExports.jsx(ia,{children:n.filter(P=>P.ruleType===Wo.settings.title.accounting.toLowerCase()).map(P=>{const k=a.auditReportGroups.find(N=>N.auditReportGroupId===P.auditRuleGroupId);return k!=null&&Object.keys(g).length>0?o.jsxRuntimeExports.jsx(oa,{loggedInUser:r,isControllerOrReviewer:a.isControllerOrReviewer,allUsers:c,isMonthEnd:i,ruleGroup:P,groupIdWithActiveStatus:g,auditReportGroup:k,setGroupIdWithActiveStatus:b,onClickRetryGroupFetch:A,onClickRule:B,handleReasonAuditRule:S},P.auditRuleGroupId):null})})]})]})]})},Ps=(e,n)=>{const r={},i={};return e.forEach(a=>{const{ruleType:c,sequence:l}=a;i[c]===void 0?i[c]={first:l,last:l}:(l<i[c].first&&(i[c].first=l),l>i[c].last&&(i[c].last=l))}),e.forEach(a=>{const{auditRuleGroupId:c,ruleType:l,sequence:d}=a,u=d<=n,m=d===i[l].first,x=d===i[l].last;r[c]={isActive:u,isGroupExpanded:!1,isFirst:m,isLast:x}}),r},Bw=e=>e.auditReportGroups.filter(r=>r.auditReport?.auditRulesGroupReport[0].isSuccess===!1).map(r=>r.auditReportGroupId),Ww=s.div`
|
|
5438
5438
|
display: flex;
|
|
5439
5439
|
flex-direction: column;
|
|
5440
5440
|
align-items: center;
|
|
@@ -5661,7 +5661,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5661
5661
|
background: ${e=>e.level==="high"?e.theme.colors.success:e.level==="mid"?e.theme.colors.alert:e.theme.colors.important};
|
|
5662
5662
|
`,O7=s(t.SmallSemiBoldSp)`
|
|
5663
5663
|
color: ${e=>e.level==="high"?e.theme.colors.success:e.level==="mid"?e.theme.colors.alert:e.theme.colors.important};
|
|
5664
|
-
`,{common:{headers:{notes:N7},texts:{actions:M7,creditLimit:z7,lastUpdatedBy:F7,name:
|
|
5664
|
+
`,{common:{headers:{notes:N7},texts:{actions:M7,creditLimit:z7,lastUpdatedBy:F7,name:_7,status:B7}}}=t.appLocale.getLocalizedStrings(),Yo={rowHeightPx:parseInt(t.Space.sp8),headerHeightPx:44,sortIconSize:t.Space.sp2},Fe={name:200,notes:60,status:110,creditLimit:120,creditScore:120,recAmount:140,rationale:200,reportDate:140,updatedBy:170,actions:120},W7=[18,6,8,10,10,10,14,10,8,6],V7=8,U7=e=>[{key:"name",label:_7,sortable:!0,width:Fe.name,justifyContent:"flex-start",growToFill:!0},{key:"notes",label:N7,sortable:!1,width:Fe.notes,justifyContent:"center"},{key:"status",label:B7,sortable:!0,width:Fe.status,justifyContent:"flex-start"},{key:"creditLimit",label:z7,sortable:!0,width:Fe.creditLimit,justifyContent:"flex-start"},{key:"creditScore",label:e.colCreditScore,sortable:!0,width:Fe.creditScore,justifyContent:"flex-start"},{key:"recAmount",label:e.colRecommendedAmount,sortable:!0,width:Fe.recAmount,justifyContent:"flex-start"},{key:"rationale",label:e.colRationale,sortable:!1,width:Fe.rationale,justifyContent:"flex-start"},{key:"reportDate",label:e.colLastAnalysedOn,sortable:!0,width:Fe.reportDate,justifyContent:"flex-start"},{key:"updatedBy",label:F7,sortable:!0,width:Fe.updatedBy,justifyContent:"flex-start"},{key:"actions",label:M7,sortable:!1,width:Fe.actions,justifyContent:"flex-end"}],Ho=s.button`
|
|
5665
5665
|
width: ${t.Space.sp5};
|
|
5666
5666
|
height: ${t.Space.sp5};
|
|
5667
5667
|
border-radius: 50%;
|
|
@@ -5910,7 +5910,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
5910
5910
|
`,z6=s(t.StandardRegularSp)`
|
|
5911
5911
|
color: ${({theme:e})=>e.colors.grey1};
|
|
5912
5912
|
line-height: 1.5;
|
|
5913
|
-
`,{cockpit:{creditAgent:gt},common:{headers:{notes:F6}}}=t.appLocale.getLocalizedStrings();function
|
|
5913
|
+
`,{cockpit:{creditAgent:gt},common:{headers:{notes:F6}}}=t.appLocale.getLocalizedStrings();function _6({cardProfilesData:e,cardProfilesActions:n,onUIStateChange:r,uiState:i}){const a=p.useMemo(()=>U7(gt),[]),[c,l]=p.useState(null),[d,u]=p.useState(""),[m,x]=p.useState(null),f=i.sortKey??null,h=i.sortDir,S=i.filterText,j=e.fetchState==="Not-Started"||e.fetchState==="In-Progress",g=E=>{r(f===E?{sortDir:h==="asc"?"desc":"asc"}:{sortKey:E,sortDir:"asc"})},b=e.rows,C=b.length,y=p.useMemo(()=>({cardProfilesActions:n,editingNs:c,editingValue:d,onEditCancel:()=>l(null),onEditChange:u,onEditStart:(E,v)=>{l(E),u(v)},onNoteOpen:x,rowCount:b.length,rows:b}),[n,c,d,b]);return o.jsxRuntimeExports.jsxs(W6,{children:[o.jsxRuntimeExports.jsxs(J6,{children:[o.jsxRuntimeExports.jsxs(e8,{children:[o.jsxRuntimeExports.jsx(t8,{children:o.jsxRuntimeExports.jsx(t.SvgSearch,{width:t.Space.sp3,height:t.Space.sp3})}),o.jsxRuntimeExports.jsx(o8,{placeholder:gt.searchPlaceholder,value:S,onChange:E=>r({filterText:E.target.value})}),!!S&&o.jsxRuntimeExports.jsx(n8,{onClick:()=>r({filterText:""}),children:o.jsxRuntimeExports.jsx(t.SvgClose,{width:t.Space.sp3,height:t.Space.sp3})})]}),!j&&o.jsxRuntimeExports.jsxs(s8,{children:[C," ",C!==1?gt.tenantCountPlural:gt.tenantCountSingular,S?` ${gt.tenantCountFound}`:""]})]}),e.fetchState==="Error"?o.jsxRuntimeExports.jsx(q6,{children:gt.failedToLoadCardProfiles}):o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(V6,{children:[o.jsxRuntimeExports.jsx(U6,{children:a.map(E=>{const v=E.sortable&&f===E.key,$=h;return o.jsxRuntimeExports.jsx(H6,{$width:E.width,$justifyContent:E.justifyContent,$growToFill:E.growToFill,children:o.jsxRuntimeExports.jsx(K6,{children:E.sortable?o.jsxRuntimeExports.jsxs(G6,{type:"button",$active:v,onClick:()=>g(E.key),children:[E.label,o.jsxRuntimeExports.jsx(Y6,{$direction:v?$:"asc",children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:Yo.sortIconSize,height:Yo.sortIconSize})})]}):E.label})},E.key)})}),j?o.jsxRuntimeExports.jsx(X6,{children:o.jsxRuntimeExports.jsx(t.ListTableSkeleton,{colPcts:W7,rowCount:V7})}):b.length===0?o.jsxRuntimeExports.jsx(Q6,{children:S||i.focus!=="All"||i.minScore>0?gt.noTenantsMatchFilters:gt.noCardProfilesYet}):o.jsxRuntimeExports.jsx(Z6,{children:o.jsxRuntimeExports.jsx(o.AutoSizer,{children:({height:E,width:v})=>o.jsxRuntimeExports.jsx(o.FixedSizeList,{height:E,width:v,itemCount:b.length,itemSize:Yo.rowHeightPx,itemData:y,innerElementType:B6,overscanCount:5,children:Ml})})})]}),m!=null&&o.jsxRuntimeExports.jsx(ot.RoomProvider,{id:m.roomId,children:o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:!0,allowComposer:!0,autoExpand:!0,autoFocus:!1,drawerTitle:`${m.companyName} ${F6}`,filter:{application:"cockpit",companyId:m.companyId,entityType:t.toCollaborationEntityType({tab:"creditAgent",key:"details"}),isGlobalComment:!1,tab:"creditAgent"},isLoading:!1,threadMetadata:{companyName:m.companyName,companyId:m.companyId,entityId:m.companyId,entityType:t.toCollaborationEntityType({tab:"creditAgent",key:"details"}),isGlobalComment:!1,application:"cockpit",tab:"creditAgent",url:window.location.href},textOverrides:{composerPlaceholder:gt.composerPlaceholder,replyComposerPlaceholder:gt.replyComposerPlaceholder},onThreadClick:()=>null,onCloseAllThreadsDrawer:()=>x(null)})})]})]})}const Ml=p.memo(({index:e,style:n,data:r})=>{const i=r.rows[e],a=e===r.rowCount-1;return o.jsxRuntimeExports.jsx(t6,{style:n,row:i,isLastRow:a,cardProfilesActions:r.cardProfilesActions,editingNs:r.editingNs,editingValue:r.editingValue,onEditStart:r.onEditStart,onEditChange:r.onEditChange,onEditCancel:r.onEditCancel,onNoteOpen:r.onNoteOpen})});Ml.displayName="CreditAgentListItem";const B6=p.forwardRef(({style:e,...n},r)=>o.jsxRuntimeExports.jsx("div",{ref:r,style:{...e,position:"relative"},...n})),W6=s.div`
|
|
5914
5914
|
display: flex;
|
|
5915
5915
|
flex-direction: column;
|
|
5916
5916
|
flex: 1;
|
|
@@ -6042,7 +6042,7 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
6042
6042
|
}
|
|
6043
6043
|
`,s8=s(t.SmallMediumSp)`
|
|
6044
6044
|
color: ${e=>e.theme.colors.hero};
|
|
6045
|
-
`,{common:zl,cockpit:{creditAgent:yt}}=t.appLocale.getLocalizedStrings(),r8=["All","New only","Interested","Active only"],i8=e=>{switch(e){case"All":return zl.all;case"New only":return yt.focusNewOnly;case"Interested":return yt.focusInterested;case"Active only":return yt.focusActiveOnly}};function a8({headerActions:e,headerData:n,creditAgentPageData:r,creditAgentPageActions:i}){const a=t.useWindowSizeContext(),{macroData:c,cardProfilesData:l}=r,{onFetchMacro:d,onSaveMacro:u,onResetSaveMacro:m,onUIStateChange:x,cardProfilesActions:f}=i,{onDownloadReport:h}=f,[S,j]=p.useState(""),[g,b]=p.useState(!1),{focus:C,minScore:y}=l.uiState;p.useEffect(()=>{c.fetchState==="Not-Started"&&d()},[c.fetchState,d]),p.useEffect(()=>{c.data!=null&&!g&&j(c.data.instructions)},[c.data,g]),p.useEffect(()=>{c.updateState==="Completed"&&(b(!1),m())},[c.updateState,m]),p.useEffect(()=>{l.fetchState==="Not-Started"&&f.onFetch()},[l.fetchState,f]);const E=p.useCallback(()=>{u(S)},[u,S]),v=p.useCallback(()=>{b(!1),c.data!=null&&j(c.data.instructions),c.updateState==="Error"&&m()},[c.data,c.updateState,m]);return o.jsxRuntimeExports.jsxs(l8,{children:[o.jsxRuntimeExports.jsx(jt,{headerActions:e,headerData:{...n,allTabOptions:n.allTabOptions??xt,selectedTabOption:"creditAgent"}}),o.jsxRuntimeExports.jsxs(c8,{windowSize:a,children:[o.jsxRuntimeExports.jsxs(d8,{children:[o.jsxRuntimeExports.jsx(p8,{}),o.jsxRuntimeExports.jsxs(u8,{children:[g&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(t.Button,{variant:"secondary",size:"small",label:zl.cancel,onClick:v}),o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",size:"small",label:c.updateState==="In-Progress"?yt.saving:yt.savePrompt,disabled:c.updateState==="In-Progress",onClick:E})]}),o.jsxRuntimeExports.jsx(t.Button,{variant:"secondary",size:"small",label:yt.downloadReport,onClick:h})]})]}),o.jsxRuntimeExports.jsxs(m8,{children:[o.jsxRuntimeExports.jsxs(x8,{children:[o.jsxRuntimeExports.jsxs(h8,{children:[o.jsxRuntimeExports.jsx(g8,{children:"✦"}),c.fetchState==="In-Progress"?o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"Standard",start:!0}):o.jsxRuntimeExports.jsx(S8,{value:S,disabled:c.updateState==="In-Progress",onChange:$=>{j($.target.value),b(!0)},placeholder:yt.promptPlaceholder,rows:6})]}),o.jsxRuntimeExports.jsxs(y8,{children:[o.jsxRuntimeExports.jsxs(pa,{children:[o.jsxRuntimeExports.jsx(ua,{children:yt.focusLabel}),o.jsxRuntimeExports.jsx(f8,{children:r8.map($=>o.jsxRuntimeExports.jsx(C8,{active:C===$,onClick:()=>x({focus:$}),children:i8($)},$))})]}),o.jsxRuntimeExports.jsx(j8,{}),o.jsxRuntimeExports.jsxs(pa,{children:[o.jsxRuntimeExports.jsx(ua,{children:yt.minScoreLabel}),o.jsxRuntimeExports.jsx(b8,{type:"range",min:0,max:100,value:y,onChange:$=>x({minScore:parseInt($.target.value)})}),o.jsxRuntimeExports.jsx(R8,{children:y})]})]})]}),c.updateState==="Error"&&o.jsxRuntimeExports.jsx(E8,{children:yt.failedToSavePrompt})]}),o.jsxRuntimeExports.jsx($8,{children:o.jsxRuntimeExports.jsx(
|
|
6045
|
+
`,{common:zl,cockpit:{creditAgent:yt}}=t.appLocale.getLocalizedStrings(),r8=["All","New only","Interested","Active only"],i8=e=>{switch(e){case"All":return zl.all;case"New only":return yt.focusNewOnly;case"Interested":return yt.focusInterested;case"Active only":return yt.focusActiveOnly}};function a8({headerActions:e,headerData:n,creditAgentPageData:r,creditAgentPageActions:i}){const a=t.useWindowSizeContext(),{macroData:c,cardProfilesData:l}=r,{onFetchMacro:d,onSaveMacro:u,onResetSaveMacro:m,onUIStateChange:x,cardProfilesActions:f}=i,{onDownloadReport:h}=f,[S,j]=p.useState(""),[g,b]=p.useState(!1),{focus:C,minScore:y}=l.uiState;p.useEffect(()=>{c.fetchState==="Not-Started"&&d()},[c.fetchState,d]),p.useEffect(()=>{c.data!=null&&!g&&j(c.data.instructions)},[c.data,g]),p.useEffect(()=>{c.updateState==="Completed"&&(b(!1),m())},[c.updateState,m]),p.useEffect(()=>{l.fetchState==="Not-Started"&&f.onFetch()},[l.fetchState,f]);const E=p.useCallback(()=>{u(S)},[u,S]),v=p.useCallback(()=>{b(!1),c.data!=null&&j(c.data.instructions),c.updateState==="Error"&&m()},[c.data,c.updateState,m]);return o.jsxRuntimeExports.jsxs(l8,{children:[o.jsxRuntimeExports.jsx(jt,{headerActions:e,headerData:{...n,allTabOptions:n.allTabOptions??xt,selectedTabOption:"creditAgent"}}),o.jsxRuntimeExports.jsxs(c8,{windowSize:a,children:[o.jsxRuntimeExports.jsxs(d8,{children:[o.jsxRuntimeExports.jsx(p8,{}),o.jsxRuntimeExports.jsxs(u8,{children:[g&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(t.Button,{variant:"secondary",size:"small",label:zl.cancel,onClick:v}),o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",size:"small",label:c.updateState==="In-Progress"?yt.saving:yt.savePrompt,disabled:c.updateState==="In-Progress",onClick:E})]}),o.jsxRuntimeExports.jsx(t.Button,{variant:"secondary",size:"small",label:yt.downloadReport,onClick:h})]})]}),o.jsxRuntimeExports.jsxs(m8,{children:[o.jsxRuntimeExports.jsxs(x8,{children:[o.jsxRuntimeExports.jsxs(h8,{children:[o.jsxRuntimeExports.jsx(g8,{children:"✦"}),c.fetchState==="In-Progress"?o.jsxRuntimeExports.jsx(t.ActivityIndicator,{size:"Standard",start:!0}):o.jsxRuntimeExports.jsx(S8,{value:S,disabled:c.updateState==="In-Progress",onChange:$=>{j($.target.value),b(!0)},placeholder:yt.promptPlaceholder,rows:6})]}),o.jsxRuntimeExports.jsxs(y8,{children:[o.jsxRuntimeExports.jsxs(pa,{children:[o.jsxRuntimeExports.jsx(ua,{children:yt.focusLabel}),o.jsxRuntimeExports.jsx(f8,{children:r8.map($=>o.jsxRuntimeExports.jsx(C8,{active:C===$,onClick:()=>x({focus:$}),children:i8($)},$))})]}),o.jsxRuntimeExports.jsx(j8,{}),o.jsxRuntimeExports.jsxs(pa,{children:[o.jsxRuntimeExports.jsx(ua,{children:yt.minScoreLabel}),o.jsxRuntimeExports.jsx(b8,{type:"range",min:0,max:100,value:y,onChange:$=>x({minScore:parseInt($.target.value)})}),o.jsxRuntimeExports.jsx(R8,{children:y})]})]})]}),c.updateState==="Error"&&o.jsxRuntimeExports.jsx(E8,{children:yt.failedToSavePrompt})]}),o.jsxRuntimeExports.jsx($8,{children:o.jsxRuntimeExports.jsx(_6,{cardProfilesData:l,cardProfilesActions:f,onUIStateChange:x,uiState:l.uiState})})]})]})}const l8=s.div`
|
|
6046
6046
|
height: calc(100vh - 45px);
|
|
6047
6047
|
overflow: hidden;
|
|
6048
6048
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -6165,4 +6165,4 @@ ${e}`,ex=e=>ce.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
6165
6165
|
`,E8=s(t.SmallRegularP)`
|
|
6166
6166
|
color: ${e=>e.theme.colors.alert};
|
|
6167
6167
|
margin-top: ${t.Space.sp2};
|
|
6168
|
-
`;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.AiCfoSkillsBrowser=t.AiCfoSkillsBrowser;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.FieldHelpIcon=t.FieldHelpIcon;exports.FieldHelpProvider=t.FieldHelpProvider;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.JEOneTimeAccrualDetailPage=t.JEOneTimeAccrualDetailPage;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.RecommendationFeedbackPopup=t.RecommendationFeedbackPopup;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.StatementParseInfoEntry;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.computeRecommendationSelectionFeedback=t.computeRecommendationSelectionFeedback;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.isRecommendationFeedbackDimension=t.isRecommendationFeedbackDimension;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.toGroupedAccountingClassOptions=t.toGroupedAccountingClassOptions;exports.toGroupedQboAccountOptions=t.toGroupedQboAccountOptions;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.useFieldHelp=t.useFieldHelp;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=Fj;exports.AiAccountantPage=ub;exports.AuditReportDrawerPage=Bw;exports.COCKPIT_TAB_OPTIONS=xt;exports.COCKPIT_TAB_OPTIONS_WITH_CREDIT_AGENT=Sc;exports.CockpitNavBar=Xc;exports.CreditAgentPage=a8;exports.HealthMonitorDetailDrawer=vS;exports.HealthMonitorPage=nf;exports.ManagementPage=gg;exports.MonthEndReportHistoricDataPage=ZE;exports.MonthEndReportPage=wE;exports.NavHeader=jt;exports.OnboardingCustomerPage=g$;exports.OnboardingPage=sR;exports.PortfolioPage=Sj;exports.ReviewPage=gv;exports.SubscriptionAddPlanPage=cC;exports.SubscriptionPage=v0;exports.SubscriptionUpdatePlanPage=F2;exports.TaskManagerPage=Kg;exports.WarningsDrawerPage=r7;exports.toCockpitOptionType=_t;exports.toCockpitOptionTypeStrict=Qc;
|
|
6168
|
+
`;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.AiCfoSkillsBrowser=t.AiCfoSkillsBrowser;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.FieldHelpIcon=t.FieldHelpIcon;exports.FieldHelpProvider=t.FieldHelpProvider;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.InvoicingPaymentLinkEmailComposerDialog=t.InvoicingPaymentLinkEmailComposerDialog;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.JEOneTimeAccrualDetailPage=t.JEOneTimeAccrualDetailPage;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.MEETING_LINK_DEFAULTS=t.MEETING_LINK_DEFAULTS;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.RecommendationFeedbackPopup=t.RecommendationFeedbackPopup;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.StatementParseInfoEntry;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.cellVerticalAlignToFlexAlign=t.cellVerticalAlignToFlexAlign;exports.clearAutoLogoutContext=t.clearAutoLogoutContext;exports.clickableRowStyles=t.clickableRowStyles;exports.computeRecommendationSelectionFeedback=t.computeRecommendationSelectionFeedback;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.getTransactionAppliedFiltersCount=t.getTransactionAppliedFiltersCount;exports.invoicingMenuList=t.invoicingMenuList;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.isRecommendationFeedbackDimension=t.isRecommendationFeedbackDimension;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.sp=t.sp;exports.textAlignForCell=t.textAlignForCell;exports.textStyles=t.textStyles;exports.toGroupedAccountingClassOptions=t.toGroupedAccountingClassOptions;exports.toGroupedQboAccountOptions=t.toGroupedQboAccountOptions;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.useFieldHelp=t.useFieldHelp;exports.useGlobalInfoContext=t.useGlobalInfoContext;exports.useLockBodyScroll=t.useLockBodyScroll;exports.useMeetingLinks=t.useMeetingLinks;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=Fj;exports.AiAccountantPage=ub;exports.AuditReportDrawerPage=_w;exports.COCKPIT_TAB_OPTIONS=xt;exports.COCKPIT_TAB_OPTIONS_WITH_CREDIT_AGENT=Sc;exports.CockpitNavBar=Xc;exports.CreditAgentPage=a8;exports.HealthMonitorDetailDrawer=vS;exports.HealthMonitorPage=nf;exports.ManagementPage=gg;exports.MonthEndReportHistoricDataPage=ZE;exports.MonthEndReportPage=wE;exports.NavHeader=jt;exports.OnboardingCustomerPage=g$;exports.OnboardingPage=sR;exports.PortfolioPage=Sj;exports.ReviewPage=gv;exports.SubscriptionAddPlanPage=cC;exports.SubscriptionPage=v0;exports.SubscriptionUpdatePlanPage=F2;exports.TaskManagerPage=Kg;exports.WarningsDrawerPage=r7;exports.toCockpitOptionType=Bt;exports.toCockpitOptionTypeStrict=Qc;
|