1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3180],{33180:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b});var l=a(95155),s=a(12115),r=a(74364),i=a(62195),o=a(12704),d=a(13336),x=a(95102),c=a(46767),n=a(44518),p=a(19566),m=a(65813),u=a(94784),h=a(19272),v=a(30641),f=a(45996),j=a(15521);let b=e=>{let{dateRange:t,setMostProductiveAppsLoading:a,setMostProductiveAppsData:b}=e,[g,N]=(0,s.useState)([]),{globalDepartment:T,globalShift:A}=(0,o.p)(),[w,k]=(0,s.useState)(!1),[C,P]=(0,s.useState)(i.NB[1]),y=(0,f.O)(),S=(0,j.pv)(),D=(0,s.useMemo)(()=>null==g?void 0:g.filter(e=>(null==e?void 0:e.totalProductiveTime)>0).map(e=>({name:null==e?void 0:e.appName,hours:null==e?void 0:e.totalProductiveTime,profileImage:(null==e?void 0:e.icon)||(null==e?void 0:e.appIcon)||i.xK.user})),[g]);(0,s.useEffect)(()=>{let e=new AbortController,a=e.signal;return(null==t?void 0:t.startDate)&&(null==t?void 0:t.endDate)&&_(a),()=>{e.abort()}},[t,T,null==A?void 0:A.value]);let _=async e=>{a&&a(!0);try{k(!0);let a=new URLSearchParams({"start-date":t.startDate,"end-date":t.endDate,tz:i.eB});(null==T?void 0:T.value)&&a.append("departmentId",T.value),(null==A?void 0:A.value)&&a.append("shiftId",A.value);let l=await y.get("/dashboard/most-productive-apps?".concat(a.toString()),{headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(S)},signal:e});200===l.status&&(N(l.data.data),b(l.data.data),k(!1))}catch(e){k(!1),console.log(e)}finally{a&&a(!1)}};return(0,l.jsx)("div",{className:"dashboardgrid grid md:grid-cols-1 gap-[24px] mt-[24px] px-[16px] custom-max-sm:px-[24px]",children:(0,l.jsx)("div",{className:"md:col-span-1 flex flex-col",children:(0,l.jsxs)("div",{className:"extra-cont relative flex-1 rounded-[6px] shadow-card bg-[#fff] shadow-custom-light border border-Custom-Grey-25 dark:bg-boxdark dark:border-borderdark",children:[(0,l.jsxs)("div",{className:"py-[16px] px-[12px] md:px-[24px] border-b-[1px] border-Custom-Grey-50 bg-Custom-Purple-200 flex items-center justify-between dark:border-borderdark",children:[(0,l.jsxs)("h3",{className:"font-semibold text-[14px] custom-max-sm:text-[16px] text-text-Custom-Black-900 flex items-center justify-start dark:text-white",children:[(0,l.jsx)(x.VPI,{className:"text-[30px] mr-[8px]"}),"Most Productive Apps",(0,l.jsx)(c.A,{texts:n.A.CHARTS_MOSTPRODUCATIVE_APP,position:"top",children:(0,l.jsx)(x.mo0,{className:"text-[32px]"})})]}),(0,l.jsx)(p.A,{handleChartType:e=>P(e),chartType:C})]}),(0,l.jsx)("div",{className:"p-[16px] custom-max-sm:p-[24px]",children:(0,l.jsx)("div",{className:"min-h-[500px]",children:w?(0,l.jsx)("div",{className:"min-h-[600px] flex flex-col items-center justify-center",children:(0,l.jsx)(d.A,{})}):(0,l.jsx)(l.Fragment,{children:(null==g?void 0:g.length)?(0,l.jsx)(l.Fragment,{children:C.value===i.oT.bar?(0,l.jsx)(m.A,{chartData:D,tooltip:"Productive time",YAxisLabel:"Time Spent (Hours)",height:500,redirect:!1,capitalize:!0,singleText:!0}):C.value===i.oT.line?(0,l.jsx)(h.A,{chartData:D,tooltip:"Productive time",YAxisLabel:"Time Spent (Hours)",height:500,redirect:!1,capitalize:!0,singleText:!0}):C.value===i.oT.area?(0,l.jsx)(v.A,{chartData:D,tooltip:"Productive time",YAxisLabel:"Time Spent (Hours)",height:500,redirect:!1,capitalize:!0,singleText:!0}):C.value===i.oT.donut?(0,l.jsx)(u.A,{chartData:D,tooltip:"Productive time",height:500,singleText:!0}):null}):(0,l.jsx)(r.x,{text:" No data collected",search:!1})})})})]})})})}},74364:(e,t,a)=>{a.d(t,{x:()=>r});var l=a(95155),s=a(95102);let r=e=>{let{showBg:t=!0,text:a,search:r,wrapperClass:i="",textClass:o=""}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"p-0 h-full w-full",children:(0,l.jsx)("div",{className:"flex flex-col justify-center items-center text-center min-h-[350px] w-full ".concat(i),children:r?(0,l.jsxs)("span",{className:"text-title-md font-light text-Custom-Black-700 flex flex-row bg-Custom-Purple-25 border rounded-[6px] p-[18px] md:max-w-[300px] w-full m-[auto] gap-[12px] text-left",children:[(0,l.jsx)(s.M$4,{})," ",a]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.H__,{className:"text-[32px]"}),(0,l.jsx)("p",{className:"text-[6px] custom-max-sm-l:text-[10px] custom-max:text-sm font-semibold text-Custom-Black-700 pt-[8px] ".concat(o),children:a})]})})}),t?(0,l.jsx)("div",{className:"absolute bottom-0 w-full overflow-hidden"}):null]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.