PageSourceSearch

https://ldai.vercel.app/_next/static/chunks/pages/dashboard-f15b42dfaf69d51d.js

js ldai.vercel.app collected 2026-10-03 07:13:47 UTC 10,309 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{91015:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard",function(){return t(76518)}])},37708:function(e,a,t){"use strict";var s=t(27378);a.Z=()=>{let[e,a]=(0,s.useState)("light");return(0,s.useEffect)(()=>{document.documentElement.classList.contains("dark")?a("dark"):a("light");let e=new MutationObserver(e=>{e.forEach(e=>{"class"===e.attributeName&&(document.documentElement.classList.contains("dark")?a("dark"):a("light"))})});return e.observe(document.documentElement,{attributes:!0}),()=>{e.disconnect()}},[]),e}},7886:function(e,a,t){"use strict";var s=t(24246);t(27378);var r=t(23615),n=t.n(r),i=t(33306),l=t(37708);let d=e=>{let a=void 0===e.show||e.show,t=(0,l.Z)();return a?(0,s.jsx)("div",{className:"w-full h-full flex justify-center items-center p-5",children:(0,s.jsx)(i.Z,{color:"dark"===t?"#09c2c2":"#4449ff",size:40,"aria-busy":!0,"aria-label":"Loading"})}):null};d.propTypes={show:n().bool},a.Z=d},82608:function(e,a,t){"use strict";t.d(a,{Z:function(){return _}});var s=t(24246),r=t(27378),n=t(14678),i=t(82099),l=t(83341),d=t(64968),o=t(73860),c=t(41827),m=t(96459),u=t(49451),x=t.n(u);let h=e=>{let{user:a}=(0,c.aF)();return(0,s.jsx)("div",{children:(0,s.jsx)(x(),{email:(null==a?void 0:a.email)||"[email protected]",size:e.size||50,rating:"pg",className:e.className})})};h.propTypes={};var f=t(5152),g=t.n(f),p=t(38944),v=t(41664),j=t.n(v),b=t(32699),N=t(49829),w=t(34412),y=t(44332);let k=g()(()=>t.e(428).then(t.bind(t,45428)),{loadableGenerated:{webpack:()=>[45428]},ssr:!1}),z=[{name:"Dashboard",href:"/dashboard"},{name:"Stats",href:"/stats/raw"},{name:"Team",href:"/team"},{name:"New Data",href:"/dashboard/data"}],Z=[{name:"Sign out",href:"/api/auth/logout"}];function _(e){let{children:a,currentPage:t,secondaryNav:u}=e,{user:x}=(0,c.aF)();null==x||x.email;let{data:f,error:g}=(0,b.Z)("/api/v1/get-user-details",N.pv),v=(0,w.I0)();return(0,r.useEffect)(()=>{v((0,y.X)(f))},[f]),(0,w.v9)(e=>e.userDetails.user),(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"min-h-full",children:[(0,s.jsx)(n.p,{as:"nav",className:"border-b border-gray-200 bg-white ",children:e=>{let{open:a}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[(0,s.jsxs)("div",{className:"flex h-12 justify-between",children:[(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)("div",{className:"flex flex-shrink-0 items-center",children:(0,s.jsx)(j(),{href:"/",children:(0,s.jsx)("h1",{className:"text-3xl tracking-wider font-bold",children:(0,s.jsx)("span",{className:"text-gradient ",children:m.Z.projectName})})})}),(0,s.jsx)("div",{className:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8",children:z.map(e=>(0,s.jsx)("a",{href:e.href,className:(0,p.Z)(e.name===t?"border-indigo-500 text-zinc-800 dark:text-zinc-100":"border-transparent text-zinc-500 dark:text-zinc-400 hover:border-gray-300 hover:text-zinc-700","inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium"),"aria-current":e.name===t?"page":void 0,children:e.name},e.name))})]}),(0,s.jsxs)("div",{className:"hidden sm:ml-6 sm:flex sm:items-center",children:[(0,s.jsx)(k,{}),(0,s.jsxs)(i.v,{as:"div",className:"relative ml-3",children:[(0,s.jsx)("div",{children:(0,s.jsxs)(i.v.Button,{className:"flex max-w-xs items-center rounded-full bg-white text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:[(0,s.jsx)("span",{className:"sr-only",children:"Open user menu"}),(0,s.jsx)(h,{size:40,className:"rounded-full"})]})}),(0,s.jsx)(l.u,{as:r.Fragment,enter:"transition ease-out duration-200",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,s.jsx)(i.v.Items,{className:"absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:Z.map(e=>(0,s.jsx)(i.v.Item,{children:a=>{let{active:t}=a;return(0,s.jsx)("a",{href:e.href,className:(0,p.Z)(t?"bg-gray-100":"","block px-4 py-2 text-sm text-zinc-700"),children:e.name})}},e.name))})})]})]}),(0,s.jsx)("div",{className:"-mr-2 flex items-center sm:hidden",children:(0,s.jsxs)(n.p.Button,{className:"inline-flex items-center justify-center rounded-md bg-white p-2 text-zinc-400 hover:bg-gray-100 hover:text-zinc-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:[(0,s.jsx)("span",{className:"sr-only",children:"Open main menu"}),a?(0,s.jsx)(d.Z,{className:"block h-6 w-6","aria-hidden":"true"}):(0,s.jsx)(o.Z,{className:"block h-6 w-6","aria-hidden":"true"})]})})]}),(0,s.jsx)("div",{children:u})]}),(0,s.jsxs)(n.p.Panel,{className:"sm:hidden",children:[(0,s.jsx)("div",{className:"space-y-1 pt-2 pb-3",children:z.map(e=>(0,s.jsx)(n.p.Button,{as:"a",href:e.href,className:(0,p.Z)(e.current?"bg-indigo-50 border-indigo-500 text-indigo-700":"border-transparent text-zinc-600 hover:bg-gray-50 hover:border-gray-300 hover:text-zinc-800","block pl-3 pr-4 py-2 border-l-4 text-base font-medium"),"aria-current":e.current?"page":void 0,children:e.name},e.name))}),(0,s.jsx)("div",{className:"border-t border-gray-200 pt-4 pb-3",children:(0,s.jsx)("div",{className:"mt-3 space-y-1",children:Z.map(e=>(0,s.jsx)(n.p.Button,{as:"a",href:e.href,className:"block px-4 py-2 text-base font-medium text-zinc-500 hover:bg-gray-100 hover:text-zinc-800",children:e.name},e.name))})})]})]})}}),(0,s.jsx)("div",{className:"py-4",children:(0,s.jsx)("main",{children:(0,s.jsx)("div",{className:"mx-auto max-w-7xl",children:a})})})]})})}},76518:function(e,a,t){"use strict";t.r(a),t.d(a,{__N_SSP:function(){return b},default:function(){return N}});
1var s=t(24246),r=t(82608),n=t(5152),i=t.n(n),l=t(27378),d=t(76131),o=t(49829),c=t(98784),m=t.n(c),u=t(7886),x=t(34412);let h=(0,l.memo)(e=>{var a;let{org:t}=e,{data:r,error:n}=(0,d.ZP)("/api/v1/get-raw-data-stats",o.pv),i=(0,x.v9)(e=>e.main.dashPage.selectedFilter),l=(null==r?void 0:null===(a=r.aggregates)||void 0===a?void 0:a[null==t?i:t])||{};return r||n?n?(0,s.jsx)("div",{children:(0,s.jsx)("p",{children:"Error loading data"})}):(0,s.jsx)("dl",{className:"mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3 mb-5",children:Object.keys(l).map(e=>(0,s.jsxs)("div",{className:"overflow-hidden rounded-lg bg-white dark:bg-zinc-900 px-4 py-5 shadow shadow-zinc-300 dark:shadow-zinc-800 sm:p-6",children:[(0,s.jsx)("dt",{className:"truncate text-sm font-medium text-zinc-500 dark:text-zinc-200",children:m().capitalize(e.replace(/_/g," "))}),(0,s.jsx)("dd",{className:"mt-1 text-3xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100",children:"number"==typeof l[e]?new Intl.NumberFormat("en-IN",{maximumSignificantDigits:5}).format(l[e]):l[e]})]},e))}):(0,s.jsx)("div",{children:(0,s.jsx)(u.Z,{})})});h.displayName="DashboardStats";var f=t(43264),g=e=>{let{data:a}=e;return(0,s.jsx)(f.h7,{data:a,margin:{top:40,right:40,bottom:40,left:50},align:"justify",colors:{scheme:"category10"},nodeOpacity:1,nodeHoverOthersOpacity:.35,nodeThickness:18,nodeSpacing:24,nodeBorderWidth:0,nodeBorderColor:{from:"color",modifiers:[["darker",.8]]},nodeBorderRadius:3,linkOpacity:.5,linkHoverOthersOpacity:.1,linkContract:3,enableLinkGradient:!0,labelPosition:"outside",labelOrientation:"vertical",labelPadding:16,labelTextColor:{from:"color",modifiers:[["darker",1]]},legends:[{anchor:"bottom-right",direction:"column",translateX:130,itemWidth:100,itemHeight:14,itemDirection:"right-to-left",itemsSpacing:2,itemTextColor:"#999",symbolSize:14,effects:[{on:"hover",style:{itemTextColor:"#000"}}]}]})};let p={nodes:[{id:"Raw Data",nodeColor:"hsl(245, 70%, 50%)"},{id:"Automated QC",nodeColor:"hsl(322, 70%, 50%)"},{id:"Automated Passed",nodeColor:"hsl(359, 70%, 50%)"}],links:[{source:"Raw Data",target:"Automated QC",value:null},{source:"Automated QC",target:"Automated Passed",value:null}]};var v=()=>{let{data:e,error:a}=(0,d.ZP)("/api/v1/get-data-by-stages",o.pv);(0,x.v9)(e=>e.userDetails.user),console.log(e);let t=(0,l.useMemo)(()=>{if(e)return{RawDataToAutomatedQC:e.raw.total_duration_hrs,AutomatedQCtoPassed:e.autoqc_passed.total_duration_hrs}},[e]);return e||a?a?(0,s.jsx)("div",{children:(0,s.jsx)("p",{children:"Error loading data"})}):(t&&(p.links[0].value=t.RawDataToAutomatedQC,p.links[1].value=t.AutomatedQCtoPassed),(0,s.jsx)("div",{className:"h-96 mt-4 w-full lg:w-3/4 sankey",children:(0,s.jsx)(g,{data:p})})):(0,s.jsx)("div",{children:(0,s.jsx)(u.Z,{})})};let j=i()(()=>Promise.all([t.e(923),t.e(401),t.e(94),t.e(260)]).then(t.bind(t,66260)),{loadableGenerated:{webpack:()=>[66260]},ssr:!1});var b=!0;function N(){let e=(0,x.v9)(e=>e.userDetails.user);return console.log(e),(0,s.jsxs)(r.Z,{currentPage:"Dashboard",children:[(0,s.jsx)("header",{children:(0,s.jsx)("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:(0,s.jsx)("h1",{className:"text-xl font-bold leading-6 pl-0",children:"Dashboard"})})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row",children:[(0,s.jsx)("div",{className:"grow",children:(0,s.jsx)("div",{className:"px-8 mt-8",children:(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)("h3",{className:"text-lg font-medium leading-6 text-zinc-900 dark:text-zinc-100",children:"Collected Data Stats"}),(0,s.jsx)(h,{org:null==e?void 0:e.org})]})})}),(0,s.jsx)("div",{children:(0,s.jsx)(l.Suspense,{fallback:(0,s.jsx)("div",{className:"min-h-[200px] min-w-[200px]",children:(0,s.jsx)(u.Z,{})}),children:(0,s.jsx)(j,{organization:null==e?void 0:e.org})})})]}),(null==e?void 0:e.org)==null&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-medium leading-6 text-zinc-900 dark:text-zinc-100 px-8",children:"Data flow"}),(0,s.jsx)(v,{})]})]})]})}},49829:function(e,a,t){"use strict";t.d(a,{JI:function(){return n},P1:function(){return i},pv:function(){return r}});var s=t(70594);let r=async(e,a)=>(await s.Z.get(e,a)).data,n=async(e,a,t)=>await s.Z.post("/api/v1/add-member",{email:e,role:a,org:t}),i=async(e,a,t)=>await s.Z.put("/api/v1/add-member",{email:e,role:a,org:t})}},function(e){e.O(0,[33,664,889,293,763,969,121,888,774,179],function(){return e(e.s=91015)}),_N_E=e.O()}]);

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.